<!DOCTYPE HTML>
<html lang="Chinese">


<head>
    <meta charset="utf-8">
    <meta name="keywords" content="html基础, 博客">
    <meta name="description" content="In me the tiger sniffs the rose.">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit|ie-stand|ie-comp">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <!-- Global site tag (gtag.js) - Google Analytics -->


    <title>html基础 | 凡诚</title>
    <link rel="icon" type="image/png" href="/favicon.png">

    <link rel="stylesheet" type="text/css" href="/libs/awesome/css/all.css">
    <link rel="stylesheet" type="text/css" href="/libs/materialize/materialize.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/aos/aos.css">
    <link rel="stylesheet" type="text/css" href="/libs/animate/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/lightGallery/css/lightgallery.min.css">
    <link rel="stylesheet" type="text/css" href="/css/matery.css">
    <link rel="stylesheet" type="text/css" href="/css/my.css">
    <script src="https://sdk.jinrishici.com/v2/browser/jinrishici.js" charset="utf-8"></script>
    <script src="/libs/jquery/jquery.min.js"></script>

<meta name="generator" content="Hexo 5.4.2"></head>



   <style>
    body{
       background-image: url(https://cdn.jsdelivr.net/gh/Tokisaki-Galaxy/res/site/medias/background.jpg);
       background-repeat:no-repeat;
       background-size:cover;
       background-attachment:fixed;
    }
</style>



<body>
    <header class="navbar-fixed">
    <nav id="headNav" class="bg-color nav-transparent">
        <div id="navContainer" class="nav-wrapper container">
            <div class="brand-logo">
                <a href="/" class="waves-effect waves-light">
                    
                    <img src="/medias/comment_bg.png" class="logo-img" alt="LOGO">
                    
                    <span class="logo-span">凡诚</span>
                </a>
            </div>
            

<a href="#" data-target="mobile-nav" class="sidenav-trigger button-collapse"><i class="fas fa-bars"></i></a>
<ul class="right nav-menu">
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/" class="waves-effect waves-light">
      
      <i class="fas fa-home" style="zoom: 0.6;"></i>
      
      <span>主页</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/tags" class="waves-effect waves-light">
      
      <i class="fas fa-tags" style="zoom: 0.6;"></i>
      
      <span>文章</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/categories" class="waves-effect waves-light">
      
      <i class="fas fa-bookmark" style="zoom: 0.6;"></i>
      
      <span>分类</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/archives" class="waves-effect waves-light">
      
      <i class="fas fa-archive" style="zoom: 0.6;"></i>
      
      <span>归档</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="" class="waves-effect waves-light">

      
      <i class="fas fa-user-circle" style="zoom: 0.6;"></i>
      
      <span>关于我</span>
      <i class="fas fa-chevron-down" aria-hidden="true" style="zoom: 0.6;"></i>
    </a>
    <ul class="sub-nav menus_item_child ">
      
      <li>
        <a href="/about">
          
          <i class="fas fa-user-circle" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>我的信息</span>
        </a>
      </li>
      
      <li>
        <a href="/contact">
          
          <i class="fas fa-comments" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>留言板</span>
        </a>
      </li>
      
      <li>
        <a href="/friends">
          
          <i class="fas fa-address-book" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>友链</span>
        </a>
      </li>
      
    </ul>
    
  </li>
  
  <li>
    <a href="#searchModal" class="modal-trigger waves-effect waves-light">
      <i id="searchIcon" class="fas fa-search" title="Search" style="zoom: 0.85;"></i>
    </a>
  </li>
</ul>


<div id="mobile-nav" class="side-nav sidenav">

    <div class="mobile-head bg-color">
        
        <img src="/medias/comment_bg.png" class="logo-img circle responsive-img">
        
        <div class="logo-name">凡诚</div>
        <div class="logo-desc">
            
            In me the tiger sniffs the rose.
            
        </div>
    </div>

    

    <ul class="menu-list mobile-menu-list">
        
        <li class="m-nav-item">
	  
		<a href="/" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-home"></i>
			
			主页
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/tags" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-tags"></i>
			
			文章
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/categories" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-bookmark"></i>
			
			分类
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/archives" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-archive"></i>
			
			归档
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="javascript:;">
			
				<i class="fa-fw fas fa-user-circle"></i>
			
			关于我
			<span class="m-icon"><i class="fas fa-chevron-right"></i></span>
		</a>
            <ul  style="background:  ;" >
              
                <li>

                  <a href="/about " style="margin-left:75px">
				  
				   <i class="fa fas fa-user-circle" style="position: absolute;left:50px" ></i>
			      
		          <span>我的信息</span>
                  </a>
                </li>
              
                <li>

                  <a href="/contact " style="margin-left:75px">
				  
				   <i class="fa fas fa-comments" style="position: absolute;left:50px" ></i>
			      
		          <span>留言板</span>
                  </a>
                </li>
              
                <li>

                  <a href="/friends " style="margin-left:75px">
				  
				   <i class="fa fas fa-address-book" style="position: absolute;left:50px" ></i>
			      
		          <span>友链</span>
                  </a>
                </li>
              
            </ul>
          
        </li>
        
        
    </ul>
</div>


        </div>

        
    </nav>

</header>

    



<div class="bg-cover pd-header post-cover" style="background-image: url('/medias/featureimages/3.jpg')">
    <div class="container" style="right: 0px;left: 0px;">
        <div class="row">
            <div class="col s12 m12 l12">
                <div class="brand">
                    <h1 class="description center-align post-title">html基础</h1>
                </div>
            </div>
        </div>
    </div>
</div>




<main class="post-container content">

    
    <link rel="stylesheet" href="/libs/tocbot/tocbot.css">
<style>
    #articleContent h1::before,
    #articleContent h2::before,
    #articleContent h3::before,
    #articleContent h4::before,
    #articleContent h5::before,
    #articleContent h6::before {
        display: block;
        content: " ";
        height: 100px;
        margin-top: -100px;
        visibility: hidden;
    }

    #articleContent :focus {
        outline: none;
    }

    .toc-fixed {
        position: fixed;
        top: 64px;
    }

    .toc-widget {
        width: 345px;
        padding-left: 20px;
    }

    .toc-widget .toc-title {
        padding: 35px 0 15px 17px;
        font-size: 1.5rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    .toc-widget ol {
        padding: 0;
        list-style: none;
    }

    #toc-content {
        padding-bottom: 30px;
        overflow: auto;
    }

    #toc-content ol {
        padding-left: 10px;
    }

    #toc-content ol li {
        padding-left: 10px;
    }

    #toc-content .toc-link:hover {
        color: #42b983;
        font-weight: 700;
        text-decoration: underline;
    }

    #toc-content .toc-link::before {
        background-color: transparent;
        max-height: 25px;

        position: absolute;
        right: 23.5vw;
        display: block;
    }

    #toc-content .is-active-link {
        color: #42b983;
    }

    #floating-toc-btn {
        position: fixed;
        right: 15px;
        bottom: 76px;
        padding-top: 15px;
        margin-bottom: 0;
        z-index: 998;
    }

    #floating-toc-btn .btn-floating {
        width: 48px;
        height: 48px;
    }

    #floating-toc-btn .btn-floating i {
        line-height: 48px;
        font-size: 1.4rem;
    }
</style>
<div class="row">
    <div id="main-content" class="col s12 m12 l9">
        <!-- 文章内容详情 -->
<div id="artDetail">
    <div class="card">
        <div class="card-content article-info">
            <div class="row tag-cate">
                <div class="col s7">
                    
                    <div class="article-tag">
                        
                            <a href="/tags/html/">
                                <span class="chip bg-color">html</span>
                            </a>
                        
                    </div>
                    
                </div>
                <div class="col s5 right-align">
                    
                    <div class="post-cate">
                        <i class="fas fa-bookmark fa-fw icon-category"></i>
                        
                            <a href="/categories/%E5%89%8D%E7%AB%AF%E6%8A%80%E6%9C%AF/" class="post-category">
                                前端技术
                            </a>
                        
                    </div>
                    
                </div>
            </div>

            <div class="post-info">
                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-minus fa-fw"></i>Publish Date:&nbsp;&nbsp;
                    2021-11-08
                </div>
                

                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-check fa-fw"></i>Update Date:&nbsp;&nbsp;
                    2022-11-10
                </div>
                

                
                <div class="info-break-policy">
                    <i class="far fa-file-word fa-fw"></i>Word Count:&nbsp;&nbsp;
                    10.4k
                </div>
                

                
                <div class="info-break-policy">
                    <i class="far fa-clock fa-fw"></i>Read Times:&nbsp;&nbsp;
                    40 Min
                </div>
                

                
                    <div id="busuanzi_container_page_pv" class="info-break-policy">
                        <i class="far fa-eye fa-fw"></i>Read Count:&nbsp;&nbsp;
                        <span id="busuanzi_value_page_pv"></span>
                    </div>
				
            </div>
        </div>
        <hr class="clearfix">

        
        <!-- 是否加载使用自带的 prismjs. -->
        <link rel="stylesheet" href="/libs/prism/prism.css">
        

        

        <div class="card-content article-card-content">
            <div id="articleContent">
                <h1 id="web基础"><a href="#web基础" class="headerlink" title="web基础"></a>web基础</h1><h2 id="一-html-基础"><a href="#一-html-基础" class="headerlink" title="一.html 基础"></a>一.html 基础</h2><h3 id="1-web概述"><a href="#1-web概述" class="headerlink" title="1 web概述"></a>1 web概述</h3><blockquote>
<p>web 是一个分布式的超媒体信息系统，它将大量的信息分布于整个internet上。web 的任务就是向人们提供多媒体网络信息服务。</p>
<p>从技术层面看，web主要有三点：超文本协议(http),统一资源定位符(url)，超文本标签语言(html)。</p>
</blockquote>
<h4 id="1-1-超文本传输协议"><a href="#1-1-超文本传输协议" class="headerlink" title="1.1 超文本传输协议"></a>1.1 超文本传输协议</h4><p>  超文本传输协议(html,hyperText transfer protocol)是客户端或其他程序与web服务器之间的应用层通讯协议，用于实现客户端和服务器端的信息传输。（共有五层）</p>
<p>物理层 数据链路层 网络层 运输层 应用层</p>
<hr>
<h4 id="1-2-统一资源定位符"><a href="#1-2-统一资源定位符" class="headerlink" title="1.2 统一资源定位符"></a>1.2 统一资源定位符</h4><p>  统一资源定位符(url,uniform/universal resource locator)用于完整的描述internet上网页和其他资源地址的一种方法。实现互联网信息的定位统一标识，可以是<code>本地磁盘</code>也可以是<code>互联网上的某一台计算机</code>，也可以是internet站点。简单的说，url就是网址。</p>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup">protocal://hostname[:port]/path/[;parameters][?query]#fragment<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<p>protocal(协议)：指定传输协议，最常用的就是<code>http</code>协议，<code>file</code>协议(访问本地磁盘)，<code>ftp</code>协议(文件传输协议，上传到服务器，或者下载到服务器)</p>
<table>
<thead>
<tr>
<th align="left">Scheme</th>
<th align="left">访问</th>
<th align="left">用于…</th>
</tr>
</thead>
<tbody><tr>
<td align="left">http</td>
<td align="left">超文本传输协议</td>
<td align="left">以 http:// 开头的普通网页。不加密。</td>
</tr>
<tr>
<td align="left">https</td>
<td align="left">安全超文本传输协议</td>
<td align="left">安全网页，加密所有信息交换。</td>
</tr>
<tr>
<td align="left">ftp</td>
<td align="left">文件传输协议</td>
<td align="left">用于将文件下载或上传至网站。</td>
</tr>
<tr>
<td align="left">file</td>
<td align="left"></td>
<td align="left">计算机上的文件。</td>
</tr>
</tbody></table>
<p>hostname(主机名)：是指定存放资源的服务器的域名或者ip地址</p>
<p>port(端口)：省略时使用默认端口，各种常用的传输协议都有默认的端口号，http默认的端口号是 80。</p>
<p>path(路径)：由0个或者多个 / 号字符隔开的字符串，一般用于表示主机的一个目录或者文件地址。</p>
<p>parameters(参数)：用于指定特殊参数。</p>
<p>query(查询)：用于给动态网页指定参数，可以有多个参数，中间用 &amp; 符号间隔，每个参数的名和值用 = 符号隔开。</p>
<p>fragment(字符串)：用于指定网络资源中的片段。</p>
<hr>
<h4 id="1-3-超文本标记语言"><a href="#1-3-超文本标记语言" class="headerlink" title="1.3 超文本标记语言"></a>1.3 超文本标记语言</h4><p>  超文本标记语言(html,hypertext mark-up language)目前网络上运用最广泛的语言，也是构成网页文档的主要语言。文档制作简单，支持多种文档嵌入，功能强大。</p>
<p>  简易性：是包含html标签文件，支持任何文本编辑工具。</p>
<p>  可扩展性：html 语言的广泛运用，带来了加强功能，增加标识符等要求，html采取扩展子类元素的方式，从而为系统扩展带来了保证。</p>
<hr>
<h3 id="2-html-文档结构"><a href="#2-html-文档结构" class="headerlink" title="2 html 文档结构"></a>2 html 文档结构</h3><blockquote>
<p>html 有html部分，head部分，body部分组成</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">></span></span>
        
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">></span></span>
    	正文部分
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>body</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>html</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<blockquote>
<p>双标签在结束标签前加 ==/==</p>
</blockquote>
<blockquote>
<p>单标签在标签后加==/==</p>
</blockquote>
<h4 id="2-1-html标签"><a href="#2-1-html标签" class="headerlink" title="2.1 html标签"></a>2.1 html标签</h4><blockquote>
<p>  文档必须以&lt;html&gt;标签开始，以&lt;/html&gt;结束，web 浏览器接收到html文件后，遇到&lt;html&gt;标签时开始解释，遇到&lt;/html&gt;标签时停止解释，文档的所有内容都在两标签之间。</p>
</blockquote>
<hr>
<h4 id="2-2-head标签"><a href="#2-2-head标签" class="headerlink" title="2.2 head标签"></a>2.2 head标签</h4><blockquote>
<p>head标签以&lt;head&gt;标签开始，以&lt;/head&gt;结束，head部分主要用于：</p>
<p>对页面使用的字符集，脚本语言，窗口标题，标签的样式进行说明和设置。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>title</span><span class="token punctuation">></span></span>, <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">></span></span>, <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span><span class="token punctuation">></span></span>, <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>link</span><span class="token punctuation">></span></span>, <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span><span class="token punctuation">></span></span>, <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>noscript</span><span class="token punctuation">></span></span> 和 <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>base</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<table>
<thead>
<tr>
<th>标签名</th>
<th>介绍</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>&lt;title&gt;&lt;/title&gt;</td>
<td>页面的标题部分</td>
<td>浏览器工具栏标题；收藏夹内标题；搜索引擎结果的标题。</td>
</tr>
<tr>
<td>&lt;meta&gt;&lt;/meta&gt;</td>
<td>（元标签）为Html文档提供额外的信息</td>
<td>浏览器（如何显示内容或重新加载页面），搜索引擎（关键词）</td>
</tr>
<tr>
<td>&lt;style&gt;&lt;/style&gt;</td>
<td>设置内联样式(css代码)</td>
<td>可以直接写，也可以连接到</td>
</tr>
<tr>
<td>&lt;link&gt;</td>
<td>链接到外部js代码</td>
<td>标签定义文档与外部资源的关系</td>
</tr>
<tr>
<td>&lt;script&gt;</td>
<td>设置js代码</td>
<td></td>
</tr>
<tr>
<td>&lt;base&gt;</td>
<td>设置默认的跳转地址的<code>基准</code>和跳转方式</td>
<td>基准，并不是默认跳转地址，只是url的一部分供超链接标签使用</td>
</tr>
<tr>
<td>&lt;noscript&gt;</td>
<td>浏览器关闭js或者不能运行js时替代的内容</td>
<td>可以写body标签中的所有代码</td>
</tr>
</tbody></table>
<hr>
<h4 id="2-3-body标签"><a href="#2-3-body标签" class="headerlink" title="2.3 body标签"></a>2.3 body标签</h4><blockquote>
<p>  body标签以<body>标签开始，以</body>结束，该部分是html文档的主体。包含了绝大部分需要呈现给浏览者浏览的内容。如段落，列表，图像和其他元素，等html页面元素，都通过一些标准的html来描述。在body中除了可以书写正文文字内容外，还可以嵌入许多由专用标签标识的内容。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">></span></span>
  xxxxxxxxxxxxxxx
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>body</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>

<table>
<thead>
<tr>
<th>标签名</th>
<th>介绍</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>&lt;br/&gt;</td>
<td>换行</td>
<td></td>
</tr>
<tr>
<td>&lt;p&gt;&lt;/p&gt;</td>
<td>分段</td>
<td></td>
</tr>
<tr>
<td>&lt;h#&gt;&lt;/h#&gt;</td>
<td>标题标签</td>
<td></td>
</tr>
<tr>
<td>&lt;font&gt;&lt;/font&gt;</td>
<td>文本标签</td>
<td></td>
</tr>
<tr>
<td>&lt;hr&gt;</td>
<td>分割线</td>
<td></td>
</tr>
<tr>
<td>&lt;ul&gt; &lt;ol&gt; &lt;dl&gt;</td>
<td>列表</td>
<td></td>
</tr>
<tr>
<td>&lt;a&gt;&lt;/a&gt;</td>
<td>超链接</td>
<td></td>
</tr>
<tr>
<td>&lt;img/&gt;</td>
<td>图像</td>
<td></td>
</tr>
<tr>
<td>&lt;iframe&gt;</td>
<td>框架</td>
<td></td>
</tr>
<tr>
<td>&lt;form&gt;</td>
<td>表单</td>
<td></td>
</tr>
<tr>
<td>&lt;frameset&gt;</td>
<td>框架集</td>
<td></td>
</tr>
<tr>
<td>&lt;table&gt;</td>
<td>表格</td>
<td></td>
</tr>
</tbody></table>
<hr>
<h3 id="3-html语法"><a href="#3-html语法" class="headerlink" title="3 html语法"></a>3 html语法</h3><blockquote>
<p>  html文档由预定义好的html标签和用户自定义的内容编写而成。html标签由ascⅡ字符来定义，用于控制页面内容的显示。</p>
</blockquote>
<h4 id="3-1-介绍"><a href="#3-1-介绍" class="headerlink" title="3.1 介绍"></a>3.1 介绍</h4><blockquote>
<p>  html通过标签控制文档的内容和外观，可以将标签，看作是html的命令。</p>
</blockquote>
<blockquote>
<p> html标签以一对尖括号为开始 &lt;&gt; 以 &lt;/&gt;表示html 标签的结束，</p>
<p> 标签必须是闭合的，闭合是指标签的最后要有一个/来表示结束，但不一定成对出现，例如&lt;br/&gt;就是单独出现，用于表示换行，诸如&lt;/br&gt;格式的标签统称为<code>空标签</code>。</p>
<p> 双标签结束标签的/在 最后一个标签前。</p>
<p> 标签与<code>大小写无关</code>，html语言不区分大小写但是为了保持内容的一致性和可读性，推荐使用小写。</p>
</blockquote>
<h4 id="3-2-属性"><a href="#3-2-属性" class="headerlink" title="3.2 属性"></a>3.2 属性</h4><blockquote>
<p>html属性一般都出现在标签中，作为html标签的一部分，html属性包含了标签所需要的额外的信息，并且一个标签可以拥有多个属性。</p>
<p>在为标签添加属性的时候需要注意如下两点：</p>
<p>1.属性的值需要在双引号中</p>
<p>2.属性名和属性值成对出现。</p>
</blockquote>
<p>其语法格式如下：</p>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>标签名</span> <span class="token attr-name">属性名1</span> <span class="token attr-value"><span class="token punctuation attr-equals">=</span> <span class="token punctuation">"</span>属性名2<span class="token punctuation">"</span></span> <span class="token attr-name">属性名2</span> <span class="token attr-value"><span class="token punctuation attr-equals">=</span> <span class="token punctuation">"</span>属性名2<span class="token punctuation">"</span></span> <span class="token punctuation">></span></span>内容<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>标签名</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<p>==虽然html不需要双引号解析但是推荐使用双引号，符合规范。==</p>
<hr>
<h4 id="3-3-注释"><a href="#3-3-注释" class="headerlink" title="3.3 注释"></a>3.3 注释</h4><blockquote>
<p>可以在html文档中添加注释，以方便阅读，查找，比对。当用浏览器查看的时候不显示在页面上。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token comment">&lt;!-- 这都是注释 --></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>



<h3 id="4-html常用标签"><a href="#4-html常用标签" class="headerlink" title="4 html常用标签"></a>4 html常用标签</h3><blockquote>
<p>标签是html语言中<code>最基本的单位</code>，也是html语言中<code>最重要的组成部分</code>。</p>
</blockquote>
<p><a target="_blank" rel="noopener" href="https://www.runoob.com/tags/html-reference.html">html标签参考手册</a></p>
<h4 id="4-1-meta标签"><a href="#4-1-meta标签" class="headerlink" title="4.1 meta标签"></a>4.1 meta标签</h4><pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">http-eqyuv</span> <span class="token attr-value"><span class="token punctuation attr-equals">=</span> <span class="token punctuation">"</span>refresh<span class="token punctuation">"</span></span> <span class="token attr-name">content</span> <span class="token attr-value"><span class="token punctuation attr-equals">=</span> <span class="token punctuation">"</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">></span></span>
    	正文部分
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>body</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>html</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>



<blockquote>
<meta>元标签作为子标签只出现在页面<head>标签，可为html文档提供额外的信息。
</blockquote>
<ol>
<li><p>name 和 content</p>
<p>该组&lt;meta&gt;标签用于描述网页，他以名称/值的形式表示，名称通过name属性表示，其值为所要描述的内容，而其值则通过content 属性表示            </p>
<table>
<thead>
<tr>
<th>值</th>
<th>说明</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>descruption</td>
<td>用于描述，使用content属性提供的简短描述，</td>
<td></td>
</tr>
<tr>
<td>keywords</td>
<td>用于定义网页关键字，使用content属性提供网页的关键词。</td>
<td></td>
</tr>
<tr>
<td>robots</td>
<td>用于定义网页送所引起索引方式，使用content属性描述网页搜索引擎的方式。</td>
<td></td>
</tr>
</tbody></table>
</li>
</ol>
<ol start="2">
<li><p>http-equiv 和content</p>
<p>该组属性用于提供http协议的相应报文头（mime、文档头），以名称/值的形式表示，其值为所要描述的内容，二内容的值通过content属性表示。</p>
<table>
<thead>
<tr>
<th>值</th>
<th>说明</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>content-type</td>
<td>用于定义用户的浏览器或者相关设备如何显示将要加载的数据，或者如何处理将要集中在的数据。</td>
<td></td>
</tr>
<tr>
<td>refresh</td>
<td>用于刷新与跳转页面。使用content属性表示刷新或者跳转的开始时间与跳转的网址。</td>
<td></td>
</tr>
<tr>
<td>expires</td>
<td>用于页面缓存过期时间，使用content属性是页面缓存的过期时间。一旦页面过期，将从服务器上重新下载新的页面。</td>
<td></td>
</tr>
<tr>
<td>pragma与no-cache</td>
<td>用于定义页面缓存。使用content属性的no-cache值表示是否缓存网页。</td>
<td></td>
</tr>
</tbody></table>
<p>charset = UTF-8</p>
<p>用于设定网页的编码方式为UTF-8</p>
<p>下面列出了适用于大多数 HTML 元素的属性：</p>
<table>
<thead>
<tr>
<th>属性</th>
<th>描述</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>class</td>
<td>为html元素定义一个或者多个类名(类名从样式文件引入)</td>
<td>class=””引号中可以填入多个class属性</td>
</tr>
<tr>
<td>id</td>
<td>定义元素的唯一id</td>
<td>每个标签只能有一个Id值</td>
</tr>
<tr>
<td>style</td>
<td>规定元素的行内样式(内联样式)</td>
<td></td>
</tr>
<tr>
<td>title</td>
<td>描述了元素的额外信息</td>
<td>移动到该元素上时显示的信息。</td>
</tr>
</tbody></table>
<hr>
</li>
</ol>
<h4 id="4-2-文本标签"><a href="#4-2-文本标签" class="headerlink" title="4.2 文本标签"></a>4.2 文本标签</h4><blockquote>
<p>html中的文本相关主要分为标题标签和字体标签。</p>
</blockquote>
<h5 id="1-标题标签"><a href="#1-标题标签" class="headerlink" title="1.标题标签"></a>1.标题标签</h5><blockquote>
<p>html中的标题字体用 &lt;#h&gt;&lt;/#h&gt;</p>
<p># 代表标题字体的大小，取值为 1~6之间的整数，随取值变大而变小</p>
<p>标题和字体大小正好相反</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h1</span> <span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>left<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>这是一个一级标题<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h1</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h2</span> <span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>right<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>这是一个二级标题<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h2</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h3</span> <span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>center<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>这是一个三级标题<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h3</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h4</span><span class="token punctuation">></span></span>这是一个四级标题<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h4</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h5</span><span class="token punctuation">></span></span>这是一个五级标题<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h5</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h6</span><span class="token punctuation">></span></span>这是一个六级标题<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h6</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<hr>
<p>align 属性用于设置标题的对其方式，该取值可以为 left,right,center.</p>
<hr>
<h5 id="2-字体标签"><a href="#2-字体标签" class="headerlink" title="2.字体标签"></a>2.字体标签</h5><blockquote>
<p>字体标签&lt;font&gt;是html中很重要的一个文本标签。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>font</span> <span class="token attr-name">face</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>字体<span class="token punctuation">"</span></span> <span class="token attr-name">size</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>字号<span class="token punctuation">"</span></span> <span class="token attr-name">color</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>字体颜色<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>内容<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>font</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<ul>
<li><p>face 用于控制文字显示的格式，其取值为特定的字体类型。字体类型可以分为中文字体类型和英文字体类型，中文字体类型只对中文字体有效，英文字体类型只对英文字体有效。</p>
</li>
<li><p>size 属性用于指定的文字显示大小，即字号。size有两种取值：取1~7的自然数，这种取值被称为绝对大小，网页中默认字号为3号，带正负号的取值，区间为[-4，+4]被称为相对取值，它们是相对于绝对大小的字号3的然后进行相应的放大或者缩小。</p>
</li>
<li><p>color 属性用于指定字体现实的颜色，字体颜色的取值可以是使用十六进制颜色，常见的颜色可以使用英文单词表示。</p>
<p>补充字体标签：</p>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>code</span><span class="token punctuation">></span></span>计算机输出<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>code</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>kbd</span><span class="token punctuation">></span></span>键盘输入<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>kbd</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tt</span><span class="token punctuation">></span></span>打字机文本<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tt</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>samp</span><span class="token punctuation">></span></span>计算机代码样本<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>samp</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>var</span><span class="token punctuation">></span></span>计算机变量<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>var</span><span class="token punctuation">></span></span>
这些标签常用于显示计算机/编程代码。<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></li>
</ul>
<h5 id="3-文本格式化标签"><a href="#3-文本格式化标签" class="headerlink" title="3. 文本格式化标签"></a>3. 文本格式化标签</h5><table>
<thead>
<tr>
<th>字符标签</th>
<th>说明</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>&lt;b&gt;……&lt;/b&gt;</td>
<td>粗体</td>
<td></td>
</tr>
<tr>
<td>&lt;i&gt;……&lt;/i&gt;</td>
<td>斜体</td>
<td></td>
</tr>
<tr>
<td>&lt;u&gt;……&lt;/u&gt;</td>
<td>对文本加下划线</td>
<td></td>
</tr>
<tr>
<td>&lt;ins&gt;……&lt;/ins&gt;</td>
<td></td>
<td>对文本加下划线</td>
</tr>
<tr>
<td>&lt;strong&gt;……&lt;/strong&gt;</td>
<td>对文本属性加强效果相当于粗体</td>
<td></td>
</tr>
<tr>
<td>&lt;big&gt;……&lt;/big&gt;</td>
<td>将当前文字字体大小的基础上增大一号</td>
<td></td>
</tr>
<tr>
<td>&lt;small&gt;……&lt;/small&gt;</td>
<td>将当前文字字体大小的基础上减小一号</td>
<td></td>
</tr>
<tr>
<td>&lt;sup&gt;……&lt;/sup&gt;</td>
<td>上标</td>
<td></td>
</tr>
<tr>
<td>&lt;snb&gt;……&lt;/sub&gt;</td>
<td>下标</td>
<td></td>
</tr>
<tr>
<td>&lt;em&gt;……&lt;/em&gt;</td>
<td>强调文本，通常以斜体表示</td>
<td></td>
</tr>
<tr>
<td>&lt;del&gt;……&lt;/del&gt;</td>
<td>删除线</td>
<td></td>
</tr>
<tr>
<td>&lt;s&gt;……&lt;/s&gt;</td>
<td>删除线</td>
<td></td>
</tr>
</tbody></table>
<table>
<thead>
<tr>
<th>特殊字符</th>
<th>转义字符</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>空格</td>
<td>&amp;nbsp;</td>
<td></td>
</tr>
<tr>
<td>大于号 &gt;</td>
<td>&amp;gt;</td>
<td></td>
</tr>
<tr>
<td>小于号 &lt;</td>
<td>&amp;lt;</td>
<td></td>
</tr>
<tr>
<td>引号 “</td>
<td>&amp;quot;</td>
<td></td>
</tr>
<tr>
<td>版权号 ©</td>
<td>&amp;copy;</td>
<td></td>
</tr>
</tbody></table>
<hr>
<blockquote>
<p>HTML 中的常用字符实体是不间断空格(&nbsp;)。</p>
<p>浏览器总是会截短 HTML 页面中的空格。如果在文本中写 10 个空格，在显示该页面之前，浏览器会删除它们中的 9 个。如需在页面中增加空格的数量，需要使用 &amp;nbsp; 字符实体。</p>
<p>实体名称<code>大小写敏感！</code></p>
</blockquote>
<table>
<thead>
<tr>
<th align="left">显示结果</th>
<th align="left">描述</th>
<th align="left">实体名称</th>
<th align="left">实体编号</th>
</tr>
</thead>
<tbody><tr>
<td align="left"></td>
<td align="left">空格</td>
<td align="left">&amp;nbsp;</td>
<td align="left">&amp;#160;</td>
</tr>
<tr>
<td align="left">&lt;</td>
<td align="left">小于号</td>
<td align="left">&amp;lt;</td>
<td align="left">&amp;#60;</td>
</tr>
<tr>
<td align="left">&gt;</td>
<td align="left">大于号</td>
<td align="left">&amp;gt;</td>
<td align="left">&amp;#62;</td>
</tr>
<tr>
<td align="left">&amp;</td>
<td align="left">和号</td>
<td align="left">&amp;amp;</td>
<td align="left">&amp;#38;</td>
</tr>
<tr>
<td align="left">“</td>
<td align="left">引号</td>
<td align="left">&amp;quot;</td>
<td align="left">&amp;#34;</td>
</tr>
<tr>
<td align="left">‘</td>
<td align="left">撇号</td>
<td align="left">&amp;apos; (IE不支持)</td>
<td align="left">&amp;#39;</td>
</tr>
<tr>
<td align="left">￠</td>
<td align="left">分</td>
<td align="left">&amp;cent;</td>
<td align="left">&amp;#162;</td>
</tr>
<tr>
<td align="left">£</td>
<td align="left">镑</td>
<td align="left">&amp;pound;</td>
<td align="left">&amp;#163;</td>
</tr>
<tr>
<td align="left">¥</td>
<td align="left">人民币/日元</td>
<td align="left">&amp;yen;</td>
<td align="left">&amp;#165;</td>
</tr>
<tr>
<td align="left">€</td>
<td align="left">欧元</td>
<td align="left">&amp;euro;</td>
<td align="left">&amp;#8364;</td>
</tr>
<tr>
<td align="left">§</td>
<td align="left">小节</td>
<td align="left">&amp;sect;</td>
<td align="left">&amp;#167;</td>
</tr>
<tr>
<td align="left">©</td>
<td align="left">版权</td>
<td align="left">&amp;copy;</td>
<td align="left">&amp;#169;</td>
</tr>
<tr>
<td align="left">®</td>
<td align="left">注册商标</td>
<td align="left">&amp;reg;</td>
<td align="left">&amp;#174;</td>
</tr>
<tr>
<td align="left">™</td>
<td align="left">商标</td>
<td align="left">&amp;trade;</td>
<td align="left">&amp;#8482;</td>
</tr>
<tr>
<td align="left">×</td>
<td align="left">乘号</td>
<td align="left">&amp;times;</td>
<td align="left">&amp;#215;</td>
</tr>
<tr>
<td align="left">÷</td>
<td align="left">除号</td>
<td align="left">&amp;divide;</td>
<td align="left">&amp;#247;</td>
</tr>
</tbody></table>
<h4 id="4-3-分隔标签"><a href="#4-3-分隔标签" class="headerlink" title="4.3 分隔标签"></a>4.3 分隔标签</h4><blockquote>
<p>html分隔标签用于区分文字段落，分为文字分隔标签和分隔线标签两类。</p>
</blockquote>
<ul>
<li>文字分隔标签</li>
</ul>
<ol>
<li><p>强制换行符标签&lt;br&gt;</p>
</li>
<li><p>强制分段标签&lt;p&gt;</p>
<blockquote>
<p>段落标签会根据浏览器的大小自动换行</p>
</blockquote>
</li>
</ol>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token comment">&lt;!-- 强制换行符--></span>
内容1 <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span><span class="token punctuation">/></span></span> 内容2

<span class="token comment">&lt;!--强制分段符--></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span>内容<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<ul>
<li><p>分割线标签</p>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>hr</span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>宽度<span class="token punctuation">"</span></span> <span class="token attr-name">size</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>厚度<span class="token punctuation">"</span></span> <span class="token attr-name">color</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>颜色<span class="token punctuation">"</span></span> <span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>对齐方式<span class="token punctuation">"</span></span> <span class="token attr-name">noshade</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>阴影<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<p>width: 用于设置&lt;hr&gt;的宽度，单位为像素(xp)， 也可使用百分比(占视口百分比)来设定。</p>
<p>size: 用于设置&lt;hr&gt;的厚度。</p>
<p>color:用于设置分割线的颜色。</p>
<p>noshade:用于设置&lt;hr&gt;的阴影。</p>
</li>
</ul>
<h4 id="4-4-分组标签"><a href="#4-4-分组标签" class="headerlink" title="4.4 分组标签"></a>4.4 分组标签</h4><h5 id="div标签"><a href="#div标签" class="headerlink" title="div标签"></a>div标签</h5><blockquote>
<p>元素没有特定的含义。除此之外，由于它属于块级元素，浏览器会在其前后显示换行。&lt;div&gt;是一个列状的块，可以用于布局。</p>
<p>如果与 CSS 一同使用，&lt;div&gt; 元素可用于对大的内容块设置样式属性。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token special-attr"><span class="token attr-name">style</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token value css language-css"><span class="token property">color</span><span class="token punctuation">:</span>#0000FF</span><span class="token punctuation">"</span></span></span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h3</span><span class="token punctuation">></span></span>这是一个在 div 元素中的标题。<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h3</span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span>这是一个在 div 元素中的文本。<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre>

<h5 id="span标签"><a href="#span标签" class="headerlink" title="span标签"></a>span标签</h5><blockquote>
<p>是内联元素，可用作文本的容器</p>
<p>&lt;span&gt; 标签提供了一种将文本的一部分或者文档的一部分独立出来的方式。提供独特的字体或者是颜色。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span>xxxxx<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span> <span class="token special-attr"><span class="token attr-name">style</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token value css language-css"><span class="token property">color</span><span class="token punctuation">:</span>blue</span><span class="token punctuation">"</span></span></span><span class="token punctuation">></span></span>xxx<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span>xxxxxx<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span>  <span class="token comment">&lt;!--为特定文本修改样式--></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<h4 id="4-5-link-引入标签"><a href="#4-5-link-引入标签" class="headerlink" title="4.5 link 引入标签"></a>4.5 link 引入标签</h4><blockquote>
<p>link可以引用外部的文件</p>
<ul>
<li>css文件</li>
<li>js文件</li>
<li>favicon 图标</li>
</ul>
</blockquote>
<blockquote>
<p>favicon 图标是显示在页面标签旁的图标，必须使用 文件名.ioc 格式的图片充当。</p>
</blockquote>
<p>创建步骤：</p>
<ol>
<li>制作favicon图标</li>
<li>将favicon图标放置到网站的根目录下</li>
<li>html页面引入favicon图标 &lt;link rel=”shortcut icon” href=” /favicon.ico” /&gt;</li>
</ol>
<hr>
<h3 id="5-列表"><a href="#5-列表" class="headerlink" title="5 列表"></a>5 列表</h3><blockquote>
<p>html 列表将相关的信息集合在一起，事条理清晰，便于人们阅读。</p>
</blockquote>
<h4 id="5-1无序列表"><a href="#5-1无序列表" class="headerlink" title="5.1无序列表"></a>5.1无序列表</h4><blockquote>
<p>无序列表又称符号列表，列表的项目可以以任何顺序进行排列。</p>
<p>无序列表的圆形可以更换成圆点或者正方形。</p>
<p>&lt;ul&gt;标签中只能出现&lt;li&gt;标签,不允许出现别的元素。</p>
<p>&lt;li&gt;标签中允许放别的元素和标签。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">http-eqyuv</span> <span class="token attr-value"><span class="token punctuation attr-equals">=</span> <span class="token punctuation">"</span>refresh<span class="token punctuation">"</span></span> <span class="token attr-name">content</span> <span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">></span></span>
        <span class="token comment">&lt;!--顺序无关紧要--></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>ul</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>li</span><span class="token punctuation">></span></span>项目<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>li</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>li</span><span class="token punctuation">></span></span>项目<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>li</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>li</span><span class="token punctuation">></span></span>项目<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>li</span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>ul</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>body</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>html</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<hr>
<h4 id="5-2-有序列表"><a href="#5-2-有序列表" class="headerlink" title="5.2 有序列表"></a>5.2 有序列表</h4><blockquote>
<p>有序列表又称编号列表，列表中的项目是按照先后顺序排列的。</p>
<p>有序列表的数字可以更换成大小写字母，大小写罗马字。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">http-eqyuv</span> <span class="token attr-value"><span class="token punctuation attr-equals">=</span> <span class="token punctuation">"</span>refresh<span class="token punctuation">"</span></span> <span class="token attr-name">content</span> <span class="token attr-value"><span class="token punctuation attr-equals">=</span> <span class="token punctuation">"</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">></span></span>
        <span class="token comment">&lt;!--顺序排列--></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>ol</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>li</span><span class="token punctuation">></span></span>项目<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>li</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>li</span><span class="token punctuation">></span></span>项目<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>li</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>li</span><span class="token punctuation">></span></span>项目<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>li</span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>ol</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>body</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>html</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>



<h4 id="5-3-自定义列表"><a href="#5-3-自定义列表" class="headerlink" title="5.3 自定义列表"></a>5.3 自定义列表</h4><blockquote>
<p>自定义列表将列表中的项目与其定义或者描述配对显示。</p>
<p>标签&lt;dl&gt;中只能包含&lt;dt&gt;和&lt;dd&gt;标签。</p>
<p>&lt;dt&gt;和&lt;dd&gt;标签中可以放置任何的标签。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">http-eqyuv</span> <span class="token attr-value"><span class="token punctuation attr-equals">=</span> <span class="token punctuation">"</span>refresh<span class="token punctuation">"</span></span> <span class="token attr-name">content</span> <span class="token attr-value"><span class="token punctuation attr-equals">=</span> <span class="token punctuation">"</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">></span></span>
        <span class="token comment">&lt;!--顺序排列--></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dl</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dt</span><span class="token punctuation">></span></span>分类<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dt</span><span class="token punctuation">></span></span>
            		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dd</span><span class="token punctuation">></span></span>项目<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dd</span><span class="token punctuation">></span></span>
            		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dd</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dd</span><span class="token punctuation">></span></span>
            		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dd</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dd</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dt</span><span class="token punctuation">></span></span>分类<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dt</span><span class="token punctuation">></span></span>
                    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dd</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dd</span><span class="token punctuation">></span></span>
            		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dd</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dd</span><span class="token punctuation">></span></span>
            		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dd</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dd</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dt</span><span class="token punctuation">></span></span>分类<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dt</span><span class="token punctuation">></span></span>
                    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dd</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dd</span><span class="token punctuation">></span></span>
            		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dd</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dd</span><span class="token punctuation">></span></span>
            		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dd</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dd</span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dl</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>body</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>html</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<hr>
<h3 id="6-超链接"><a href="#6-超链接" class="headerlink" title="6 超链接"></a>6 超链接</h3><blockquote>
<p>互联网的精髓就在于互相连接，即超链接，一个网站的各个网页都是通过超链接来衔接起来的。</p>
<p>1.文字超链接：在文字上建立超链接。</p>
<p>2.网页元素超链接：在网页中的各种网页元素如文本，图像，表格，音频，视频等都是可以添加超链接的。</p>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">helf</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>超链接地址<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
	网页元素标签
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>



<p>3.热区超链接：在图像的指定区域建立超链接。</p>
<p>4.下载链接：如果helf里面的地址是一个文件或者压缩包，会下载这个文件。</p>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">helf</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>压缩包或文件地址<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>下载文件<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>



<p>5.在文档的头部定义&lt;base href=”默认地址” target=”打开方式”&gt; 即使以后超链接标签不设置完整地址，跳转方式，都将使用&lt;base&gt;标签的默认值进行。</p>
<p>6.超链接标签会默认跳转。想要取消默认的跳转方法：</p>
<pre><code>1. herf属性中填写javascript:;来取消跳转。
</code></pre>
<p>在a标签定义的函数最后添加return:falst; 来取消跳转。</p>
<p>7.锚点链接</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token comment">&lt;!--打开链接--></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>url<span class="token punctuation">"</span></span> <span class="token attr-name">target</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>……<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>……<span class="token punctuation">"</span></span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>……<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>内存<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span>

<span class="token comment">&lt;!--打开默认邮箱--></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>mailto:邮箱地址<span class="token punctuation">"</span></span> <span class="token attr-name">target</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>……<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>……<span class="token punctuation">"</span></span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>……<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>内存<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span>

<span class="token comment">&lt;!--设立锚点方法一--></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>锚点名<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>内容<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span> 
<span class="token comment">&lt;!--跳转到锚点--></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>#锚点名<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span>

<span class="token comment">&lt;!--设立锚点方法二--></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h1</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>锚点名<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
  这是一个标题
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h1</span><span class="token punctuation">></span></span>
<span class="token comment">&lt;!--跳转到锚点--></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>#锚点名<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<blockquote>
<p>8.空连接：未指定对应链接地址的超链接：</p>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">helf</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>#<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>空连接<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
</blockquote>
<p>href属性：用于定义超来凝结的跳转地址，其取值可以是本地地址，也可以是远程地址，可以是一个网址，甚至是一个html文档的一个位置或者是一个邮箱地址，可以是相对路径也可以是绝对路径。</p>
<p>target属性：用于指定目标的打开位置。</p>
<p>title属性：鼠标悬停在超链接上的时候，显示的文字注释。</p>
<p>id属性：在目标文件中定义的一个锚点，标识超链接跳转的位置</p>
<p>内容：这就是所定义的超链接的一个外套。</p>
<p>target属性的取值范围：</p>
<table>
<thead>
<tr>
<th>值</th>
<th>说明</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>_self</td>
<td>当前窗口中打开目标文件，默认值</td>
<td></td>
</tr>
<tr>
<td>_blank</td>
<td>在新的窗口中打开网页</td>
<td></td>
</tr>
<tr>
<td>_top</td>
<td>在顶层框架中打开网页</td>
<td></td>
</tr>
<tr>
<td>_parent</td>
<td>在当前框架中的上一层框架打开网页</td>
<td></td>
</tr>
<tr>
<td>iframe标签中的定义名</td>
<td>在定义iframe框架中打开网页</td>
<td></td>
</tr>
</tbody></table>
<hr>
<h3 id="7-图像"><a href="#7-图像" class="headerlink" title="7  图像"></a>7  图像</h3><blockquote>
<p>把图像文件插入到文档中</p>
<p>动图和静态图的插入语法相同</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>img</span> <span class="token attr-name">str</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>图像路径<span class="token punctuation">"</span></span> <span class="token attr-name">alt</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span> <span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span> <span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<p>str属性：图像路径。</p>
<p>alt属性：替换文本，浏览器如果没有载入图片成功时，显示alt属性的值。</p>
<p>title属性： 提示文本，鼠标悬停时提示的文本。</p>
<p>align属性：设置图片的垂直对齐方向。</p>
<p>height属性：设置图片的高度，缺省显示图片的原始高度。(只设置高不设置宽会等比例缩放)</p>
<p>width属性：设置图片的宽度，缺省显示图片的原始高度。(只设置宽不设置高会等比例缩放)</p>
<p>border属性： 设置图像的边框粗细。</p>
<h3 id="8-表格标签"><a href="#8-表格标签" class="headerlink" title="8 表格标签"></a>8 表格标签</h3><blockquote>
<p>表格可以清晰地展现数据之间的关系，实质对比更容易理解。</p>
<p>最外层&lt;table&gt; &gt; &lt;thead&gt; &amp; &lt;tbody&gt; &amp; &lt;tfoot&gt; &amp;&lt;caption&gt; &gt; &lt;tr&gt; &amp; &lt;th&gt; &gt; &lt;td&gt;</p>
<p>表格中还能放表格，列表，极其丧心病狂！</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">http-eqyuv</span> <span class="token attr-value"><span class="token punctuation attr-equals">=</span> <span class="token punctuation">"</span>refresh<span class="token punctuation">"</span></span> <span class="token attr-name">content</span> <span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>table</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>caption</span><span class="token punctuation">></span></span>这是一个标题<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>caption</span><span class="token punctuation">></span></span>	<span class="token comment">&lt;!--定义表格标题--></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>thead</span><span class="token punctuation">></span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span><span class="token punctuation">></span></span>表头<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span>		<span class="token comment">&lt;!--定义表格表头--></span>
            	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span><span class="token punctuation">></span></span>表头<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>thead</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>table</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tbody</span><span class="token punctuation">></span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span>		<span class="token comment">&lt;!--定义表格的一行--></span>
                    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>数据<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span>		<span class="token comment">&lt;!--定义表格的一个单元格--></span>
                	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>数据<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span>   <span class="token comment">&lt;!--定义表格的一行--></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span>
                    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>数据<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span>		<span class="token comment">&lt;!--定义表格的一个单元格--></span>
                	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>数据<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span>   
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tbody</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tfoot</span><span class="token punctuation">></span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span>		<span class="token comment">&lt;!--定义表格的一行--></span>
                    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>脚注<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span>         
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tfoot</span><span class="token punctuation">></span></span>
        
        
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>table</span><span class="token punctuation">></span></span>   
          
<span class="token comment">&lt;!-- 常用简便写法：--></span>
          <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>table</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span>
              	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span>
              	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span>
                 <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span>
          <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>table</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p>&lt;table&gt;标签: 定义一个单元格。</p>
<p>&lt;caption&gt;标签: 定义一个表格标题。必须紧跟在&lt;table&gt;之后，且每个表格只能有一个标题。</p>
<p>&lt;th&gt;标签：定义一个单元格内的表头标签，通常是粗体。</p>
<p>&lt;tr&gt;标签：定义表格中的一行。</p>
<p>&lt;td&gt;标签：定义表格中一行中的一个单元格。</p>
<p>&lt;thead&gt;标签：定义表格的表头部分。</p>
<p>&lt;tbody&gt;标签：定义表格的主体部分。可以将白哦个中的一行或者几行分成不同的部分，不同部分不能跨越。</p>
<p>&lt;tfoot&gt;标签：定义表格的页脚。</p>
<p>&lt;col&gt;标签：定义表格中针对一个或者多个列的属性值，只能在表格或&lt;colgroup&gt;标签中使用。</p>
<p>&lt;colgroup&gt;标签：定义表格列的分组，通过此标签可以对列进行组合以便于进行格式化，此标签只能再table内部使用。</p>
<p>表格常用属性：</p>
<table>
<thead>
<tr>
<th>表格属性</th>
<th>说明</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>border</td>
<td>设置表格边框</td>
<td></td>
</tr>
<tr>
<td>bgcolor</td>
<td>设置表格背景色</td>
<td></td>
</tr>
<tr>
<td>background</td>
<td>设置表格背景图片</td>
<td></td>
</tr>
<tr>
<td>width</td>
<td>设置表格的宽度，单位像素或者百分比</td>
<td></td>
</tr>
<tr>
<td>height</td>
<td>设置表格的长度，单位像素或者百分比</td>
<td></td>
</tr>
<tr>
<td>align</td>
<td>设置对齐方式，有left right center</td>
<td></td>
</tr>
<tr>
<td>cellspacing</td>
<td>设置单元格之间的距离</td>
<td>默认不为零，出现双层边</td>
</tr>
<tr>
<td>cellpadding</td>
<td>设置单元格内容与边框的距离</td>
<td></td>
</tr>
<tr>
<td>colspan</td>
<td>单元格水平合并，值为合并单元格的数量</td>
<td>可以看作占水平的格数</td>
</tr>
<tr>
<td>rowspan</td>
<td>单元格垂直合并，值为合并单元格的数量</td>
<td>可以看作占垂直的格数</td>
</tr>
</tbody></table>
<hr>
<h3 id="9-区块元素和内联元素"><a href="#9-区块元素和内联元素" class="headerlink" title="9 区块元素和内联元素"></a>9 区块元素和内联元素</h3><blockquote>
<p>大多数 HTML 元素被定义为<strong>块级元素</strong>或<strong>内联元素</strong>。</p>
<p>区块元素：</p>
<p>块级元素在浏览器显示时，通常会以新行来开始（和结束）。</p>
<p>内联元素：</p>
<p>内联元素在显示时通常不会以新行开始。</p>
<p>可以</p>
</blockquote>
<hr>
<h3 id="10-html的布局"><a href="#10-html的布局" class="headerlink" title="10 html的布局"></a>10 html的布局</h3><blockquote>
<p>网页布局对改善网站的外观非常重要。</p>
</blockquote>
<h4 id="1-div-布局法"><a href="#1-div-布局法" class="headerlink" title="1. div 布局法"></a>1. div 布局法</h4><blockquote>
<p>可以使用 &lt;div&gt; 或者 &lt;table&gt; 元素来创建多列。CSS 用于对元素进行定位，或者为页面创建背景以及色彩丰富的外观。</p>
</blockquote>
<p><img src="https://www.runoob.com/wp-content/uploads/2013/07/26291745-6A59-45C0-847E-322B55AB6339.jpg" alt="div布局"></p>
<h4 id="2-table布局法"><a href="#2-table布局法" class="headerlink" title="2. table布局法"></a>2. table布局法</h4><blockquote>
<p>table&gt; 元素来创建多列。CSS 用于对元素进行定位，或者为页面创建背景以及色彩丰富的外观。</p>
<p>并不推荐，&lt;table&gt;目的是呈现表格化数据，并不用于网页布局。</p>
</blockquote>
<h3 id="11-表单"><a href="#11-表单" class="headerlink" title="11 表单"></a>11 表单</h3><blockquote>
<p>表单是一个包含表单元素的区域。表单并不可见，只是一个透明的容器。</p>
<p>==一个完整的表单通常由：表单域，表单控件(表单元素)和提示信息组成。==</p>
</blockquote>
<blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>form</span><span class="token punctuation">></span></span> //表单域
	提示信息： <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>  //表单元素
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>form</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>



<p>表单元素是允许用户在表单中输入内容,比如：文本域(textarea)、下拉列表(select)、单选框(radio-buttons)、复选框(checkboxes)等等。主要分为：</p>
<ul>
<li>input输入表单元素</li>
<li>select下拉表单元素</li>
<li>textarea文本域表单元素</li>
</ul>
<p>表单使用表单标签 &lt;form&gt; 来设置:</p>
</blockquote>
<table>
<thead>
<tr>
<th>属性</th>
<th>值</th>
<th>描述</th>
</tr>
</thead>
<tbody><tr>
<td>accept</td>
<td>MIME_type</td>
<td>规定服务器接受的文件类型</td>
</tr>
<tr>
<td>accept-charset</td>
<td>character_set</td>
<td>规定服务器可处理的表单数据字符集</td>
</tr>
<tr>
<td>action</td>
<td>URL</td>
<td>规定当前提交表单时向何处发送数据</td>
</tr>
<tr>
<td>autocomplete</td>
<td>On / off</td>
<td>规定是否启用表单的自动发送功能</td>
</tr>
<tr>
<td>enctype</td>
<td>application/x-www-form-urlencoded<br/>multipart/form-data<br/>text/plain</td>
<td>规定在向服务器发送表单数据之前如何进行编码（适用于 method=”post” 的情况）</td>
</tr>
<tr>
<td>method</td>
<td>get / post</td>
<td>规定用于发送表单数据的 HTTP 方法。</td>
</tr>
<tr>
<td>name</td>
<td>text</td>
<td>规定表单的名称。</td>
</tr>
<tr>
<td>novalidate</td>
<td>novalidate</td>
<td>如果使用该属性，则提交表单时不进行验证。</td>
</tr>
<tr>
<td>target</td>
<td>_blank<br/>_self<br/>_parent<br/>_top</td>
<td>规定在何处打开 action URL。</td>
</tr>
</tbody></table>
<h4 id="表单域"><a href="#表单域" class="headerlink" title="表单域"></a>表单域</h4><blockquote>
<p>使用&lt;form&gt;标签定义表单域，以实现用户信息的手机和传递，&lt;form&gt;标签会把它范围内的表单元素信息提交给服务器。</p>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>form</span> <span class="token attr-name">action</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>url地址<span class="token punctuation">"</span></span>  <span class="token attr-name">method</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>提交方式<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>表单域的名称<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>form</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>

<table>
<thead>
<tr>
<th>属性</th>
<th>属性值</th>
<th>作用</th>
</tr>
</thead>
<tbody><tr>
<td>action</td>
<td>url地址</td>
<td>指定接收表单数据的服务器程序</td>
</tr>
<tr>
<td>name</td>
<td>名称</td>
<td>用于设置表单数据提交方式</td>
</tr>
<tr>
<td>method</td>
<td>get或post</td>
<td>用于指定表单的名称，一个页面可能由许多表单域</td>
</tr>
</tbody></table>
</blockquote>
<h4 id="11-1-输入元素"><a href="#11-1-输入元素" class="headerlink" title="11.1 输入元素"></a>11.1 输入元素</h4><blockquote>
<p>多数情况下被用到的表单标签是输入标签（&lt;input&gt;）。输入类型是由类型属性（type）定义的。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>form</span><span class="token punctuation">></span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>输入元素类型<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>键名<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>form</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>

<blockquote>
<p>type可取的属性值：</p>
<table>
<thead>
<tr>
<th>属性值</th>
<th>描述</th>
</tr>
</thead>
<tbody><tr>
<td>button</td>
<td>自定义可点击按钮</td>
</tr>
<tr>
<td>checkbox</td>
<td>复选框</td>
</tr>
<tr>
<td>file</td>
<td>定义输入字段和浏览按钮，供文件上传。</td>
</tr>
<tr>
<td>hidden</td>
<td>定义隐藏的输入字段。</td>
</tr>
<tr>
<td>image</td>
<td>定义图像形式的提交按钮</td>
</tr>
<tr>
<td>password</td>
<td>定义密码字段。该字段中的字符被掩码</td>
</tr>
<tr>
<td>radio</td>
<td>定义单选按钮</td>
</tr>
<tr>
<td>reset</td>
<td>定义重置按钮。重置按钮会清楚表单中的所有数据</td>
</tr>
<tr>
<td>submit</td>
<td>定义提交按钮，会把表单数据提交给服务器</td>
</tr>
<tr>
<td>text</td>
<td>定义单行输入字段默认宽度20个字符</td>
</tr>
</tbody></table>
</blockquote>
<p>input标签属性：</p>
<table>
<thead>
<tr>
<th>属性</th>
<th>属性值</th>
<th>描述</th>
</tr>
</thead>
<tbody><tr>
<td>name</td>
<td>由用户定义</td>
<td>定义input元素的名称</td>
</tr>
<tr>
<td>value</td>
<td>由用户定义</td>
<td>规定input元素的值，可以首次加载显示</td>
</tr>
<tr>
<td>checked</td>
<td>checked</td>
<td>规定此input元素首次加载时应被选中</td>
</tr>
<tr>
<td>maxlength</td>
<td>正整数</td>
<td>规定输入字段中的字符的最大长度</td>
</tr>
</tbody></table>
<h5 id="文本域"><a href="#文本域" class="headerlink" title="文本域"></a>文本域</h5><blockquote>
<p>文本域通过&lt;input type=”text” name=”键名”&gt; 标签来设定，当用户要在表单中键入字母、数字等内容时，就会用到文本域。</p>
<p>如果加上 value=”默认值”  定义文本域的默认值</p>
<p>在大多数浏览器中，文本域的默认宽度是 20 个字符。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>form</span><span class="token punctuation">></span></span>
创建一个文本域：<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>text<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>键名<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span><span class="token punctuation">></span></span>
创建一个文本域：<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>text<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>键名<span class="token punctuation">"</span></span> <span class="token attr-name">value</span> <span class="token attr-value"><span class="token punctuation attr-equals">=</span> <span class="token punctuation">"</span>未输入时的默认显示<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>form</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>



<h5 id="密码字段"><a href="#密码字段" class="headerlink" title="密码字段"></a>密码字段</h5><blockquote>
<p>密码字段通过标签&lt;input type=”password” name=”键名”&gt; 来定义。</p>
<p>密码字段字符不会明文显示，而是以星号或圆点替代。</p>
<p>密码字段并无更具体的保密能力。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>form</span><span class="token punctuation">></span></span>
创建密码字段： <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>password<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>键名<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>form</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>





<h5 id="单选按钮"><a href="#单选按钮" class="headerlink" title="单选按钮"></a>单选按钮</h5><blockquote>
<p>&lt;input type=”radio” name=”键名” value=”单选按钮的文本”&gt; 标签定义了表单单选框选项.</p>
<p>多个同name属性的单选按钮在一个&lt;form&gt;标签中，只能单选其中之一。</p>
<p>同名的为一组单选按钮。</p>
</blockquote>
<form>
    <input type="radio" name="键名" value="单选按钮的文本"/>这是一个单选框
</form>

<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>form</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>radio<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>键名一<span class="token punctuation">"</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>值1<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>单选框文本<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>radio<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>键名一<span class="token punctuation">"</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>值2<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>单选框文本
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>form</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre>



<h5 id="复选框"><a href="#复选框" class="headerlink" title="复选框"></a>复选框</h5><blockquote>
<p><input type="checkbox" name="键名" value="复选按钮的值"> 定义了复选框. 用户需要从若干给定的选择中选取一个或若干选项。</p>
<p>同名的为一组复选按钮。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>form</span><span class="token punctuation">></span></span>
    
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>checkbox<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>键名<span class="token punctuation">"</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>复选按钮1<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>复选框文本 	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>checkbox<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>键名<span class="token punctuation">"</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>复选按钮2<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>复选框文本
    
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>form</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>





<h5 id="提交按钮"><a href="#提交按钮" class="headerlink" title="提交按钮"></a>提交按钮</h5><blockquote>
<p><input type="submit" value="显示文本">  定义了提交按钮.</p>
<p>当用户单击确认按钮时，表单的内容会被传送到另一个文件。表单的动作属性定义了目的文件的文件名。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>form</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>input<span class="token punctuation">"</span></span> <span class="token attr-name">action</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>动作相应位置<span class="token punctuation">"</span></span> <span class="token attr-name">method</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>动作请求方式（get/post）<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
输入文本框: <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>text<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>user<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>submit<span class="token punctuation">"</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>提交按钮<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>form</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre>



<h5 id="复位按钮"><a href="#复位按钮" class="headerlink" title="复位按钮"></a>复位按钮</h5><blockquote>
<input type="reset" value="显示文本">

<p>当用户单击按钮时，复位按钮所在的<form>标签中的所有内容恢复到默认状态。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>form</span> <span class="token punctuation">></span></span>
    
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>reset<span class="token punctuation">"</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>重置<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>
    
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>form</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<h4 id="11-2-label标签"><a href="#11-2-label标签" class="headerlink" title="11.2 label标签"></a>11.2 label标签</h4><blockquote>
<p>&lt;label&gt; 标签为input元素定义标注。</p>
<p>&lt;label&gt;标签用于绑定一个表单元素，当点击&lt;label&gt;标签内的文本时，浏览器会自动将焦点转到或者选择对应的表单元素上，增加用户体验。</p>
<p>&lt;lable&gt;标签中的for属性要和相关元素的==id==属性相同。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>form</span><span class="token punctuation">></span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>label</span> <span class="token attr-name">for</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>sex<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>男<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>label</span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>radio<span class="token punctuation">"</span></span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>sex<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>form</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre>



<h4 id="11-3下拉列表"><a href="#11-3下拉列表" class="headerlink" title="11.3下拉列表"></a>11.3下拉列表</h4><blockquote>
<p>创建一个下拉列表，下拉列表框是一个可选列表。节约页面空间。</p>
<p>下拉列表可以选择默认值。</p>
<p>selected属性选定默认值，下拉列表以输入顺序为默认顺序。</p>
<p>&lt;option&gt;标签属性：</p>
<table>
<thead>
<tr>
<th>属性</th>
<th>作用</th>
</tr>
</thead>
<tbody><tr>
<td>selected</td>
<td>设置默认选中</td>
</tr>
</tbody></table>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token comment">&lt;!--无默认值--></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>form</span> <span class="token attr-name">action</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>select</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>cars<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>option</span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>值一<span class="token punctuation">"</span></span> <span class="token attr-name">selected</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>selected<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>下拉列表文本一<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>option</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>option</span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>值二<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>下拉列表文本二<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>option</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>option</span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>值三<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>下拉列表文本三<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>option</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>option</span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>值四<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>下拉列表文本四<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>option</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>select</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>form</span><span class="token punctuation">></span></span>

<span class="token comment">&lt;!--设定默认值--></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>form</span> <span class="token attr-name">action</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>select</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>cars<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>option</span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>值一<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>下拉列表文本一<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>option</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>option</span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>值二<span class="token punctuation">"</span></span> <span class="token attr-name">selected</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>selected<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>下拉列表文本二<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>option</span><span class="token punctuation">></span></span>     //默认选中
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>option</span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>值三<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>下拉列表文本三<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>option</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>option</span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>值四<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>下拉列表文本四<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>option</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>select</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>form</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<h4 id="11-4-文本域"><a href="#11-4-文本域" class="headerlink" title="11.4 文本域"></a>11.4 文本域</h4><blockquote>
<p>当输入内容较多时，不能使用文本框表单，需要使用&lt;textarea&gt;标签，可以定义多行输入。</p>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>form</span><span class="token punctuation">></span></span>
  介绍：<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>textarea</span><span class="token punctuation">></span></span>
 			显示的文字
  		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>textarea</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>form</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p>&lt;textarea&gt;属性：</p>
<table>
<thead>
<tr>
<th>属性</th>
<th>值</th>
<th>描述</th>
</tr>
</thead>
<tbody><tr>
<td>cols</td>
<td>数字</td>
<td>每行中的字符数</td>
</tr>
<tr>
<td>rows</td>
<td>数字</td>
<td>显示的行数</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody></table>
</blockquote>
<h3 id="12-iframeset框架"><a href="#12-iframeset框架" class="headerlink" title="12  iframeset框架"></a>12  iframeset框架</h3><blockquote>
<p>用iframeset来划分页面，将一个页面划分为多个窗口。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span><span class="token punctuation">></span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">></span></span>
   
    	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>title</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>title</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">></span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">></span></span>
    	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>frameset</span> <span class="token attr-name">cols[rows]</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>10%，*<span class="token punctuation">"</span></span><span class="token punctuation">></span></span> <span class="token comment">&lt;!--使用cols纵向划分，使用rows横向划分，可以控制划分的大小，可以使用具体大小，也可以使用百分比，*号为自动计算--></span>
        	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>frameset</span> <span class="token attr-name">cols[rows]</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>50%，*<span class="token punctuation">"</span></span><span class="token punctuation">></span></span> <span class="token comment">&lt;!--frameset可以嵌套使用，进行继续的划分--></span>        	
            	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>frame</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>资源地址<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>窗口名<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span><span class="token comment">&lt;!--可以通过窗口名来指定那个窗口打开链接。--></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>frame</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>资源地址<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>窗口名<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>
        	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>frameset</span><span class="token punctuation">></span></span>
            
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>frame</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>资源地址<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>窗口名<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>      
            
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>frameset</span><span class="token punctuation">></span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>body</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>html</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p>frameset属性：</p>
<table>
<thead>
<tr>
<th>属性名</th>
<th>说明</th>
<th>作用</th>
</tr>
</thead>
<tbody><tr>
<td>cols</td>
<td>用像素数或者百分比分割左右窗口，*表示剩余部分。</td>
<td></td>
</tr>
<tr>
<td>rows</td>
<td>用像素数或者百分比分割上下窗口，*表示剩余部分。</td>
<td></td>
</tr>
<tr>
<td>frameborder</td>
<td>设置框架的边框，其值只有0和1.0表示没有边框，1表示显示边框。边框是无法调整粗细的。</td>
<td></td>
</tr>
<tr>
<td>framespacing</td>
<td>表示框架与框架间的空白距离。</td>
<td></td>
</tr>
</tbody></table>
<p>frame属性：</p>
<table>
<thead>
<tr>
<th>属性名</th>
<th>描述</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>bordercolor</td>
<td>设置边框颜色</td>
<td></td>
</tr>
<tr>
<td>border</td>
<td>设置边框粗细</td>
<td></td>
</tr>
<tr>
<td>name</td>
<td>框架的名称，在设置超链接的时候作为框架的标记。</td>
<td></td>
</tr>
<tr>
<td>scrolling</td>
<td>设置设置显示滚动条，yes表示显示，no表示不显示，auto表示根据情况自动调整。</td>
<td></td>
</tr>
<tr>
<td>noresize</td>
<td>设置框架大小是否固定，如果不设置则可以使用鼠标进行调整。</td>
<td></td>
</tr>
<tr>
<td>marginwidth</td>
<td>设置内容与窗口左右边缘的距离，默认为1</td>
<td></td>
</tr>
<tr>
<td>marginheight</td>
<td>设置内容与窗口上下边缘的距离，默认为1</td>
<td></td>
</tr>
<tr>
<td>width/height</td>
<td>框架的宽度即高度，默认为100</td>
<td></td>
</tr>
<tr>
<td>align</td>
<td>对齐方式</td>
<td></td>
</tr>
</tbody></table>
<h3 id="12-iframe框架"><a href="#12-iframe框架" class="headerlink" title="12# iframe框架"></a>12# iframe框架</h3><blockquote>
<p>URL指向不同的网页</p>
<p>&lt;iframe&gt;&lt;/iframe&gt;标签用于在一个页面中再嵌套另一个页面</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>iframe</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>页面的路径<span class="token punctuation">"</span></span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>单位xp，也可以输入百分比<span class="token punctuation">"</span></span> <span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>单位xp，也可以输入百分比<span class="token punctuation">"</span></span> <span class="token attr-name">frameborder</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>边框厚度，单位xp<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>iframe的名字<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>iframe</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>



<h4 id="12-1-使用iframe来显示超链接页面"><a href="#12-1-使用iframe来显示超链接页面" class="headerlink" title="12.1 使用iframe来显示超链接页面"></a>12.1 使用iframe来显示超链接页面</h4><blockquote>
<p>在iframe标签中定义name 属性，在a标签中设定helf在定义target属性等于iframe标签中的name属性，以iframe为打开方式，使用iframe标签在当前页面显示超链接。</p>
<p>iframe中的src属性定义默认显示的页面，a中定义的href属性定义的是点击后跳转的页面。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>iframe</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>默认显示文件路径<span class="token punctuation">"</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>定义名<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>iframe</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>超链接网址<span class="token punctuation">"</span></span> <span class="token attr-name">target</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>iframe标签中的定义名<span class="token punctuation">"</span></span> <span class="token punctuation">></span></span>RUNOOB.COM<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre>





<h3 id="13-html颜色"><a href="#13-html颜色" class="headerlink" title="13 html颜色"></a>13 html颜色</h3><blockquote>
<p>HTML 颜色由一个十六进制符号来定义，这个符号由红色、绿色和蓝色的值组成（RGB）。</p>
<p>每种颜色的最小值是0（十六进制：#00）。最大值是255（十六进制：#FF）。</p>
<p>浏览器也支持较少的通用单词直接写入属性。</p>
</blockquote>
<pre class="line-numbers language-none"><code class="language-none">六位十六进制颜色：  #FF00FF     rgb颜色： rgb(225,0,111)	三位十六进制颜色： #0F0<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<p>六位十六进制颜色：</p>
<p> #  :   标志此代码是16进制颜色,之后的每两位分别表示红绿蓝颜色程度。</p>
<p>rgb颜色：</p>
<p>rgb（） ： 标志这是一个rgb表示的颜色，每一位坐标表示红绿蓝颜色的成都。</p>
<p>三位十六进制颜色：</p>
<p> #  :   标志此代码是16进制颜色,之后的每一位分别表示红绿蓝颜色程度。</p>
<h3 id="14-script脚本"><a href="#14-script脚本" class="headerlink" title="14 script脚本"></a>14 script脚本</h3><blockquote>
<p>&lt;script&gt; 标签用于定义客户端脚本，比如 JavaScript。</p>
<p>&lt;script&gt; 元素既可包含脚本语句，也可通过 src 属性指向外部脚本文件。<br>JavaScript 最常用于图片操作、表单验证以及内容动态更新。</p>
<p>可以直接在html输出，也可以进行事件响应，也可以处理html样式。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span><span class="token punctuation">></span></span><span class="token script"><span class="token language-javascript">
    
document<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span><span class="token string">"Hello World!"</span><span class="token punctuation">)</span>
    
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>



<h4 id="15-1-noscript"><a href="#15-1-noscript" class="headerlink" title="15.1 noscript"></a>15.1 noscript</h4><blockquote>
<p>元素可包含普通 HTML 页面的 body 元素中能够找到的所有元素。</p>
<p>只有在浏览器不支持脚本或者禁用脚本时，才会显示 &lt;noscript&gt; 元素中的内容：</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span><span class="token punctuation">></span></span><span class="token script"><span class="token language-javascript">
document<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span><span class="token string">"Hello World!"</span><span class="token punctuation">)</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">></span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>noscript</span><span class="token punctuation">></span></span>抱歉，你的浏览器不支持 JavaScript!<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>noscript</span><span class="token punctuation">></span></span> <span class="token comment">&lt;!--浏览器不支持脚本或者禁用脚本时，才会显示 --></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>



<h2 id="二-html-5"><a href="#二-html-5" class="headerlink" title="二.html 5"></a>二.html 5</h2><blockquote>
<p>html5的新增特性主要是针对以前的不足，新增了一些新的标签，新的表单，和新的表单属性。</p>
<p>这些新特性都存在兼容问题，IE9之后才兼容。</p>
</blockquote>
<ul>
<li>&lt;header&gt; :头部标签</li>
<li>&lt;nav&gt;: 导航标签</li>
<li>&lt;article&gt;:内容标签</li>
<li>&lt;section&gt;:定义文档的某个区域</li>
<li>&lt;aside&gt;:侧边栏标签</li>
<li>&lt;footer&gt;:尾部标签</li>
</ul>
<blockquote>
<ul>
<li>这种语义化标准主要是针对搜索引擎的。</li>
<li>这些标签再页面中可以使用多次。</li>
<li>==再IE9中需要转换为块级元素。==</li>
<li>移动端更适合。</li>
</ul>
</blockquote>
<h3 id="1-新增的多媒体标签"><a href="#1-新增的多媒体标签" class="headerlink" title="1.新增的多媒体标签"></a>1.新增的多媒体标签</h3><blockquote>
<ul>
<li>音频标签：&lt;audio&gt;</li>
<li>视频标签：&lt;video&gt;</li>
</ul>
<p>可以很方便的再页面中嵌入视频和音频，不用去使用flash和其他浏览器插件。</p>
</blockquote>
<h4 id="1-1-视频标签-lt-video-gt"><a href="#1-1-视频标签-lt-video-gt" class="headerlink" title="1.1 视频标签 &lt;video&gt;"></a>1.1 视频标签 &lt;video&gt;</h4><blockquote>
<p>当前&lt;video&gt;元素支持三种视频格式，尽量使用MP4格式。</p>
</blockquote>
<table>
<thead>
<tr>
<th>浏览器</th>
<th>MP4</th>
<th>webm</th>
<th>ogg</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>intemet Explorer</td>
<td>y</td>
<td>n</td>
<td>n</td>
<td></td>
</tr>
<tr>
<td>Chrome</td>
<td>y</td>
<td>y</td>
<td>y</td>
<td></td>
</tr>
<tr>
<td>Firefox</td>
<td>y</td>
<td>y</td>
<td>y</td>
<td></td>
</tr>
<tr>
<td>Safari</td>
<td>y</td>
<td>n</td>
<td>n</td>
<td></td>
</tr>
<tr>
<td>Opera</td>
<td>y</td>
<td>y</td>
<td>y</td>
<td></td>
</tr>
</tbody></table>
<blockquote>
<p>语法格式:</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>video</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>文件路径<span class="token punctuation">"</span></span> <span class="token attr-name">controls</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>controls<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>video</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<blockquote>
<p>比较完善的使用形式</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup">//从上往下执行，执行成功会跳过下面的代码
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>video</span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>宽度<span class="token punctuation">"</span></span> <span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>长度<span class="token punctuation">"</span></span> <span class="token attr-name">controls</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>controls<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>source</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>文件.mp4<span class="token punctuation">"</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>video/mp4<span class="token punctuation">"</span></span><span class="token punctuation">></span></span> 
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>source</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>文件.ogg<span class="token punctuation">"</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>video/ogg<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    浏览器不支持video标签！
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>video</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<table>
<thead>
<tr>
<th align="left">属性</th>
<th align="left">值</th>
<th align="left">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="left">autoplay</td>
<td align="left">autoplay</td>
<td align="left">如果出现该属性，则视频在就绪后马上播放。(谷歌浏览器需要添加muted属性才能自动播放)</td>
</tr>
<tr>
<td align="left">controls</td>
<td align="left">controls</td>
<td align="left">如果出现该属性，则向用户显示控件，比如播放按钮。</td>
</tr>
<tr>
<td align="left">height</td>
<td align="left"><em>pixels</em></td>
<td align="left">设置视频播放器的高度。</td>
</tr>
<tr>
<td align="left">loop</td>
<td align="left">loop</td>
<td align="left">如果出现该属性，则当媒介文件完成播放后再次开始播放。</td>
</tr>
<tr>
<td align="left">muted</td>
<td align="left">muted</td>
<td align="left">如果出现该属性，视频的音频输出为静音。</td>
</tr>
<tr>
<td align="left">poster</td>
<td align="left"><em>URL</em></td>
<td align="left">规定视频正在下载时显示的图像，直到用户点击播放按钮。</td>
</tr>
<tr>
<td align="left">preload</td>
<td align="left">auto metadata none</td>
<td align="left">如果出现该属性，则视频在页面加载时进行加载，并预备播放。如果使用 “autoplay”，则忽略该属性。</td>
</tr>
<tr>
<td align="left">src</td>
<td align="left"><em>URL</em></td>
<td align="left">要播放的视频的 URL。</td>
</tr>
<tr>
<td align="left">width</td>
<td align="left"><em>pixels</em></td>
<td align="left">设置视频播放器的宽度。</td>
</tr>
</tbody></table>
<h4 id="1-2-音频标签"><a href="#1-2-音频标签" class="headerlink" title="1.2 音频标签 "></a>1.2 音频标签 <audio></h4><blockquote>
<p>谷歌浏览器默认为静音播放。</p>
<p>音频标签支持三种格式：</p>
</blockquote>
<table>
<thead>
<tr>
<th>浏览器</th>
<th>MP3</th>
<th>wav</th>
<th>ogg</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>intemet Explorer</td>
<td>y</td>
<td>n</td>
<td>n</td>
<td></td>
</tr>
<tr>
<td>Chrome</td>
<td>y</td>
<td>y</td>
<td>y</td>
<td></td>
</tr>
<tr>
<td>Firefox</td>
<td>y</td>
<td>y</td>
<td>y</td>
<td></td>
</tr>
<tr>
<td>Safari</td>
<td>y</td>
<td>y</td>
<td>n</td>
<td></td>
</tr>
<tr>
<td>Opera</td>
<td>y</td>
<td>y</td>
<td>y</td>
<td></td>
</tr>
</tbody></table>
<blockquote>
<p>语法格式：</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>audio</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>audio</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<blockquote>
<p>比较完善的使用形式：</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup">//从上往下执行，执行成功会跳过下面的代码
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>audio</span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>宽度<span class="token punctuation">"</span></span> <span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>长度<span class="token punctuation">"</span></span> <span class="token attr-name">controls</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>controls<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>source</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>文件.mp3<span class="token punctuation">"</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>audio/mp3<span class="token punctuation">"</span></span><span class="token punctuation">></span></span> 
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>source</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>文件.ogg<span class="token punctuation">"</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>audio/ogg<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    浏览器不支持audio标签！
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>audio</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<table>
<thead>
<tr>
<th align="left">属性</th>
<th align="left">值</th>
<th align="left">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="left">autoplay</td>
<td align="left">autoplay</td>
<td align="left">如果出现该属性，则音频在就绪后马上播放。</td>
</tr>
<tr>
<td align="left">controls</td>
<td align="left">controls</td>
<td align="left">如果出现该属性，则向用户显示音频控件（比如播放/暂停按钮）。</td>
</tr>
<tr>
<td align="left">loop</td>
<td align="left">loop</td>
<td align="left">如果出现该属性，则每当音频结束时重新开始播放。</td>
</tr>
<tr>
<td align="left">muted</td>
<td align="left">muted</td>
<td align="left">如果出现该属性，则音频输出为静音。</td>
</tr>
<tr>
<td align="left">preload</td>
<td align="left">auto metadata none</td>
<td align="left">规定当网页加载时，音频是否默认被加载以及如何被加载。</td>
</tr>
<tr>
<td align="left">src</td>
<td align="left"><em>URL</em></td>
<td align="left">规定音频文件的 URL。</td>
</tr>
</tbody></table>
<h3 id="2-新增的表单标签"><a href="#2-新增的表单标签" class="headerlink" title="2.新增的表单标签"></a>2.新增的表单标签</h3><blockquote>
<p>html5新增了许多表单类型，之前需要使用js才能实现的表单在html5中只需要添加相应的属性即可实现。</p>
<p>以下表单属性对于移动端也适用，且更好。</p>
</blockquote>
<table>
<thead>
<tr>
<th>属性值</th>
<th>说明</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>type=”email”</td>
<td>限制用户输入必须为Email类型</td>
<td></td>
</tr>
<tr>
<td>type=”url”</td>
<td>限制用户输入必须为url类型</td>
<td></td>
</tr>
<tr>
<td>type=”data”</td>
<td>限制用户输入必须为日期类型</td>
<td></td>
</tr>
<tr>
<td>type=”time”</td>
<td>限制用户输入必须为时间类型</td>
<td></td>
</tr>
<tr>
<td>type=”month”</td>
<td>限制用户输入必须为月类型</td>
<td></td>
</tr>
<tr>
<td>type=”week”</td>
<td>限制用户输入必须为周类型</td>
<td></td>
</tr>
<tr>
<td>type=”number”</td>
<td>限制用户输入必须为数字类型</td>
<td></td>
</tr>
<tr>
<td>type=”tel”</td>
<td>手机号码</td>
<td></td>
</tr>
<tr>
<td>type=”search”</td>
<td>搜索框</td>
<td></td>
</tr>
<tr>
<td>type=”color”</td>
<td>生成一个颜色选择表单</td>
<td></td>
</tr>
</tbody></table>
<h3 id="3-新增的表单属性"><a href="#3-新增的表单属性" class="headerlink" title="3.新增的表单属性"></a>3.新增的表单属性</h3><blockquote>
<p>HTML5新增了许多表单属性。</p>
</blockquote>
<table>
<thead>
<tr>
<th>属性</th>
<th>值</th>
<th>说明</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>required</td>
<td>required</td>
<td>表单拥有该属性表示其内容不能为空，必填</td>
<td></td>
</tr>
<tr>
<td>placeholder</td>
<td>提示文本</td>
<td>表单的提示信息，存在默认值将不显示</td>
<td></td>
</tr>
<tr>
<td>autofocus</td>
<td>autofocus</td>
<td>自动聚焦属性，页面加载完成自动获取焦点到指定表单</td>
<td></td>
</tr>
<tr>
<td>autocomplete</td>
<td>off/on</td>
<td>当用户开始此字段的键入时，浏览器将基于之前键入过的值，应该出现在字段中填写的选项。</td>
<td>为了安全不使用</td>
</tr>
<tr>
<td>multiple</td>
<td>multiole</td>
<td>可以多选文件提交</td>
<td></td>
</tr>
</tbody></table>
<h2 id="三-网站TDK三大标签SEO优化"><a href="#三-网站TDK三大标签SEO优化" class="headerlink" title="三.网站TDK三大标签SEO优化"></a>三.网站TDK三大标签SEO优化</h2><blockquote>
<p>SEO 汉译为搜索引擎优化，是一种利用搜索引擎的规则提高网站在有关搜索引擎内自然排名的方式。</p>
<p>SEO 的目的是对网站进行深度的优化，从而帮助网站获取免费的流量，进而在搜索引擎提升网站的排名，提高网站的知名度。</p>
</blockquote>
<p>页面必须有三个标签符合SEO优化。</p>
<ul>
<li>title标签：</li>
<li>description标签：</li>
<li>keyword标签：</li>
</ul>
<h3 id="title-网站标题"><a href="#title-网站标题" class="headerlink" title="title 网站标题"></a>title 网站标题</h3><blockquote>
<p>title 具有不可替代性，是内页的第一个重要的标签，是搜索引擎了解网页的入口对网页主体归属的最佳判断点。</p>
<p>title： 网站名 - 网站的介绍 （尽量不要超过30个汉字）</p>
</blockquote>
<h3 id="description-网站说明"><a href="#description-网站说明" class="headerlink" title="description 网站说明"></a>description 网站说明</h3><blockquote>
<p>简要的说明网站的主要功能和作用。</p>
<p>多采用：  我们提倡，我们是，我们提供，作为。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span> description<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>网站的介绍<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>



<h3 id="keywords-关键字"><a href="#keywords-关键字" class="headerlink" title="keywords 关键字"></a>keywords 关键字</h3><blockquote>
<p>keywords 是页面关键词，是搜索引擎的关注点之一。</p>
<p>keywords最好限制为6~8个词，关键字之间用英文逗号隔开，采用 <code>关键字1,关键字2</code> 的形式。</p>
</blockquote>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>keywords<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>`关键字1,关键字2<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>



<h2 id="四-重要常识"><a href="#四-重要常识" class="headerlink" title="四.重要常识"></a>四.重要常识</h2><blockquote>
<p>记载这许多实用的的常识。</p>
</blockquote>
<h3 id="LOGO-SEO-优化"><a href="#LOGO-SEO-优化" class="headerlink" title="LOGO SEO 优化"></a>LOGO SEO 优化</h3><blockquote>
<ol>
<li>logo 里面首先放一个h1标签，目的是为了提权，告诉搜索引擎，这个地方的重要性 。</li>
<li>h1里面再放一个链接，可以返回首页，把logo背景图片给链接即可。</li>
<li>为了搜索引擎收录，可以再链接中放文字(网站名称)，但是文字不要显示出来。<ul>
<li>方法1：text-indent移到盒子的外面(text-indent：-9999px)，然后overflow：hidden。</li>
<li>方法2：font-size：0；就看不到文字了。</li>
</ul>
</li>
<li>最后给链接一个title属性。鼠标梵高logo上就会看到提示文字了。</li>
</ol>
</blockquote>

                
            </div>
            <hr/>

            

    <div class="reprint" id="reprint-statement">
        
            <div class="reprint__author">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-user">
                        Author:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="/about" rel="external nofollow noreferrer">凡诚</a>
                </span>
            </div>
            <div class="reprint__type">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-link">
                        Link:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="http://example.com/2021/11/08/web-ji-chu/">http://example.com/2021/11/08/web-ji-chu/</a>
                </span>
            </div>
            <div class="reprint__notice">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-copyright">
                        Reprint policy:
                    </i>
                </span>
                <span class="reprint-info">
                    All articles in this blog are used except for special statements
                    <a href="https://creativecommons.org/licenses/by/4.0/deed.zh" rel="external nofollow noreferrer" target="_blank">CC BY 4.0</a>
                    reprint polocy. If reproduced, please indicate source
                    <a href="/about" target="_blank">凡诚</a>
                    !
                </span>
            </div>
        
    </div>

    <script async defer>
      document.addEventListener("copy", function (e) {
        let toastHTML = '<span>Copied successfully, please follow the reprint policy of this article</span><button class="btn-flat toast-action" onclick="navToReprintStatement()" style="font-size: smaller">more</a>';
        M.toast({html: toastHTML})
      });

      function navToReprintStatement() {
        $("html, body").animate({scrollTop: $("#reprint-statement").offset().top - 80}, 800);
      }
    </script>



            <div class="tag_share" style="display: block;">
                <div class="post-meta__tag-list" style="display: inline-block;">
                    
                        <div class="article-tag">
                            
                                <a href="/tags/html/">
                                    <span class="chip bg-color">html</span>
                                </a>
                            
                        </div>
                    
                </div>
                <div class="post_share" style="zoom: 80%; width: fit-content; display: inline-block; float: right; margin: -0.15rem 0;">
                    <link rel="stylesheet" type="text/css" href="/libs/share/css/share.min.css">
<div id="article-share">

    
    <div class="social-share" data-sites="twitter,facebook,google,qq,qzone,wechat,weibo,douban,linkedin" data-wechat-qrcode-helper="<p>微信扫一扫即可分享！</p>"></div>
    <script src="/libs/share/js/social-share.min.js"></script>
    

    

</div>

                </div>
            </div>
            
                <style>
    #reward {
        margin: 40px 0;
        text-align: center;
    }

    #reward .reward-link {
        font-size: 1.4rem;
        line-height: 38px;
    }

    #reward .btn-floating:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    #rewardModal {
        width: 320px;
        height: 350px;
    }

    #rewardModal .reward-title {
        margin: 15px auto;
        padding-bottom: 5px;
    }

    #rewardModal .modal-content {
        padding: 10px;
    }

    #rewardModal .close {
        position: absolute;
        right: 15px;
        top: 15px;
        color: rgba(0, 0, 0, 0.5);
        font-size: 1.3rem;
        line-height: 20px;
        cursor: pointer;
    }

    #rewardModal .close:hover {
        color: #ef5350;
        transform: scale(1.3);
        -moz-transform:scale(1.3);
        -webkit-transform:scale(1.3);
        -o-transform:scale(1.3);
    }

    #rewardModal .reward-tabs {
        margin: 0 auto;
        width: 210px;
    }

    .reward-tabs .tabs {
        height: 38px;
        margin: 10px auto;
        padding-left: 0;
    }

    .reward-content ul {
        padding-left: 0 !important;
    }

    .reward-tabs .tabs .tab {
        height: 38px;
        line-height: 38px;
    }

    .reward-tabs .tab a {
        color: #fff;
        background-color: #ccc;
    }

    .reward-tabs .tab a:hover {
        background-color: #ccc;
        color: #fff;
    }

    .reward-tabs .wechat-tab .active {
        color: #fff !important;
        background-color: #22AB38 !important;
    }

    .reward-tabs .alipay-tab .active {
        color: #fff !important;
        background-color: #019FE8 !important;
    }

    .reward-tabs .reward-img {
        width: 210px;
        height: 210px;
    }
</style>

<div id="reward">
    <a href="#rewardModal" class="reward-link modal-trigger btn-floating btn-medium waves-effect waves-light red">赏</a>

    <!-- Modal Structure -->
    <div id="rewardModal" class="modal">
        <div class="modal-content">
            <a class="close modal-close"><i class="fas fa-times"></i></a>
            <h4 class="reward-title">你的赏识是我前进的动力</h4>
            <div class="reward-content">
                <div class="reward-tabs">
                    <ul class="tabs row">
                        <li class="tab col s6 alipay-tab waves-effect waves-light"><a href="#alipay">支付宝</a></li>
                        <li class="tab col s6 wechat-tab waves-effect waves-light"><a href="#wechat">微 信</a></li>
                    </ul>
                    <div id="alipay">
                        <img src="/medias/reward/alipay.jpg" class="reward-img" alt="支付宝打赏二维码">
                    </div>
                    <div id="wechat">
                        <img src="/medias/reward/wechat.png" class="reward-img" alt="微信打赏二维码">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $('.tabs').tabs();
    });
</script>

            
        </div>
    </div>

    

    

    

    
    <div class="livere-card card" data-aos="fade-up">
    <!-- 来必力City版安装代码 -->
    <div id="lv-container" class="card-content" data-id="city" data-uid="MTAyMC81NzU4NC8zNDA0OA==">
        <script type="text/javascript">
            (function (d, s) {
                let j, e = d.getElementsByTagName(s)[0];
                if (typeof LivereTower === 'function') {
                    return;
                }

                j = d.createElement(s);
                j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
                j.async = true;

                e.parentNode.insertBefore(j, e);
            })(document, 'script');
        </script>
        <noscript>为正常使用来必力评论功能请激活JavaScript。</noscript>
    </div>
    <!-- City版安装代码已完成 -->
</div>
    

    

    

    

    

<article id="prenext-posts" class="prev-next articles">
    <div class="row article-row">
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge left-badge text-color">
                <i class="fas fa-chevron-left"></i>&nbsp;Previous</div>
            <div class="card">
                <a href="/2021/11/08/yi-dong-duan-ji-chu/">
                    <div class="card-image">
                        
                        
                        <img src="/medias/featureimages/8.jpg" class="responsive-img" alt="移动端基础">
                        
                        <span class="card-title">移动端基础</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            html在移动端的适配
                        
                    </div>
                    <div class="publish-info">
                        <span class="publish-date">
                            <i class="far fa-clock fa-fw icon-date"></i>2021-11-08
                        </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E5%89%8D%E7%AB%AF%E6%8A%80%E6%9C%AF/" class="post-category">
                                    前端技术
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/html/">
                        <span class="chip bg-color">html</span>
                    </a>
                    
                    <a href="/tags/%E7%A7%BB%E5%8A%A8%E7%AB%AF/">
                        <span class="chip bg-color">移动端</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge right-badge text-color">
                Next&nbsp;<i class="fas fa-chevron-right"></i>
            </div>
            <div class="card">
                <a href="/2021/11/08/java-shu-ju-jie-gou/">
                    <div class="card-image">
                        
                        
                        <img src="/medias/featureimages/9.jpg" class="responsive-img" alt="数据结构">
                        
                        <span class="card-title">数据结构</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            数据结构是计算机存储、组织数据的方式。数据结构是指相互之间存在一种或多种特定关系的数据元素的集合。
                        
                    </div>
                    <div class="publish-info">
                            <span class="publish-date">
                                <i class="far fa-clock fa-fw icon-date"></i>2021-11-08
                            </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/" class="post-category">
                                    数据结构
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/java/">
                        <span class="chip bg-color">java</span>
                    </a>
                    
                    <a href="/tags/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">
                        <span class="chip bg-color">数据结构</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
    </div>
</article>

</div>



<!-- 代码块功能依赖 -->
<script type="text/javascript" src="/libs/codeBlock/codeBlockFuction.js"></script>

<!-- 代码语言 -->

<script type="text/javascript" src="/libs/codeBlock/codeLang.js"></script>


<!-- 代码块复制 -->

<script type="text/javascript" src="/libs/codeBlock/codeCopy.js"></script>


<!-- 代码块收缩 -->

<script type="text/javascript" src="/libs/codeBlock/codeShrink.js"></script>


    </div>
    <div id="toc-aside" class="expanded col l3 hide-on-med-and-down">
        <div class="toc-widget card" style="background-color: white;">
            <div class="toc-title"><i class="far fa-list-alt"></i>&nbsp;&nbsp;TOC</div>
            <div id="toc-content"></div>
        </div>
    </div>
</div>

<!-- TOC 悬浮按钮. -->

<div id="floating-toc-btn" class="hide-on-med-and-down">
    <a class="btn-floating btn-large bg-color">
        <i class="fas fa-list-ul"></i>
    </a>
</div>


<script src="/libs/tocbot/tocbot.min.js"></script>
<script>
    $(function () {
        tocbot.init({
            tocSelector: '#toc-content',
            contentSelector: '#articleContent',
            headingsOffset: -($(window).height() * 0.4 - 45),
            collapseDepth: Number('0'),
            headingSelector: 'h2, h3, h4'
        });

        // modify the toc link href to support Chinese.
        let i = 0;
        let tocHeading = 'toc-heading-';
        $('#toc-content a').each(function () {
            $(this).attr('href', '#' + tocHeading + (++i));
        });

        // modify the heading title id to support Chinese.
        i = 0;
        $('#articleContent').children('h2, h3, h4').each(function () {
            $(this).attr('id', tocHeading + (++i));
        });

        // Set scroll toc fixed.
        let tocHeight = parseInt($(window).height() * 0.4 - 64);
        let $tocWidget = $('.toc-widget');
        $(window).scroll(function () {
            let scroll = $(window).scrollTop();
            /* add post toc fixed. */
            if (scroll > tocHeight) {
                $tocWidget.addClass('toc-fixed');
            } else {
                $tocWidget.removeClass('toc-fixed');
            }
        });

        
        /* 修复文章卡片 div 的宽度. */
        let fixPostCardWidth = function (srcId, targetId) {
            let srcDiv = $('#' + srcId);
            if (srcDiv.length === 0) {
                return;
            }

            let w = srcDiv.width();
            if (w >= 450) {
                w = w + 21;
            } else if (w >= 350 && w < 450) {
                w = w + 18;
            } else if (w >= 300 && w < 350) {
                w = w + 16;
            } else {
                w = w + 14;
            }
            $('#' + targetId).width(w);
        };

        // 切换TOC目录展开收缩的相关操作.
        const expandedClass = 'expanded';
        let $tocAside = $('#toc-aside');
        let $mainContent = $('#main-content');
        $('#floating-toc-btn .btn-floating').click(function () {
            if ($tocAside.hasClass(expandedClass)) {
                $tocAside.removeClass(expandedClass).hide();
                $mainContent.removeClass('l9');
            } else {
                $tocAside.addClass(expandedClass).show();
                $mainContent.addClass('l9');
            }
            fixPostCardWidth('artDetail', 'prenext-posts');
        });
        
    });
</script>

    

</main>




    <footer class="page-footer bg-color">
    
        <link rel="stylesheet" href="/libs/aplayer/APlayer.min.css">
<style>
    .aplayer .aplayer-lrc p {
        
        font-size: 12px;
        font-weight: 700;
        line-height: 16px !important;
    }

    .aplayer .aplayer-lrc p.aplayer-lrc-current {
        
        font-size: 15px;
        color: blue;
    }

    
    .aplayer.aplayer-fixed.aplayer-narrow .aplayer-body {
        left: -66px !important;
    }

    .aplayer.aplayer-fixed.aplayer-narrow .aplayer-body:hover {
        left: 0px !important;
    }

    
</style>
<div class="">
    
    <div class="row">
        <meting-js class="col l8 offset-l2 m10 offset-m1 s12"
                   server="netease"
                   type="playlist"
                   id="2477330090"
                   fixed='true'
                   autoplay='false'
                   theme='blue'
                   loop='all'
                   order='random'
                   preload='auto'
                   volume='0.7'
                   list-folded='true'
        >
        </meting-js>
    </div>
</div>

<script src="/libs/aplayer/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/meting@2/dist/Meting.min.js"></script>

    
    <div class="container row center-align" style="margin-bottom: 15px !important;">
        <div class="col s12 m8 l8 copy-right">
            Copyright&nbsp;&copy;
            
                <span id="year">2022</span>
            
            <span id="year">2022</span>
            <a href="/about" target="_blank">凡诚</a>
            &nbsp;&nbsp;<a href="https://hexo.io/" target="_blank"></a>
            |&nbsp;Theme&nbsp;<a href="https://github.com/blinkfox/hexo-theme-matery" target="_blank">Matery</a>
            <br>
            
            &nbsp;<i class="fas fa-chart-area"></i>&nbsp;站点总字数:&nbsp;<span
                class="white-color">607.1k</span>&nbsp;字
            
            
            
            
            
            
            <span id="busuanzi_container_site_pv">
                |&nbsp;<i class="far fa-eye"></i>&nbsp;总访问量:&nbsp;<span id="busuanzi_value_site_pv"
                    class="white-color"></span>&nbsp;次
            </span>
            
            
            <span id="busuanzi_container_site_uv">
                |&nbsp;<i class="fas fa-users"></i>&nbsp;总访问人数:&nbsp;<span id="busuanzi_value_site_uv"
                    class="white-color"></span>&nbsp;人
            </span>
            
            <br>
            
            <span id="sitetime">载入运行时间...</span>
            <script>
                function siteTime() {
                    var seconds = 1000;
                    var minutes = seconds * 60;
                    var hours = minutes * 60;
                    var days = hours * 24;
                    var years = days * 365;
                    var today = new Date();
                    var startYear = "2022";
                    var startMonth = "11";
                    var startDate = "7";
                    var startHour = "0";
                    var startMinute = "0";
                    var startSecond = "0";
                    var todayYear = today.getFullYear();
                    var todayMonth = today.getMonth() + 1;
                    var todayDate = today.getDate();
                    var todayHour = today.getHours();
                    var todayMinute = today.getMinutes();
                    var todaySecond = today.getSeconds();
                    var t1 = Date.UTC(startYear, startMonth, startDate, startHour, startMinute, startSecond);
                    var t2 = Date.UTC(todayYear, todayMonth, todayDate, todayHour, todayMinute, todaySecond);
                    var diff = t2 - t1;
                    var diffYears = Math.floor(diff / years);
                    var diffDays = Math.floor((diff / days) - diffYears * 365);
                    var diffHours = Math.floor((diff - (diffYears * 365 + diffDays) * days) / hours);
                    var diffMinutes = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours) /
                        minutes);
                    var diffSeconds = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours -
                        diffMinutes * minutes) / seconds);
                    if (startYear == todayYear) {
                        document.getElementById("year").innerHTML = todayYear;
                        document.getElementById("sitetime").innerHTML = "本站已安全运行 " + diffDays + " 天 " + diffHours +
                            " 小时 " + diffMinutes + " 分钟 " + diffSeconds + " 秒";
                    } else {
                        document.getElementById("year").innerHTML = startYear + " - " + todayYear;
                        document.getElementById("sitetime").innerHTML = "本站已安全运行 " + diffYears + " 年 " + diffDays +
                            " 天 " + diffHours + " 小时 " + diffMinutes + " 分钟 " + diffSeconds + " 秒";
                    }
                }
                setInterval(siteTime, 1000);
            </script>
            
            <br>
            
        </div>
        <div class="col s12 m4 l4 social-link social-statis">
    <a href="https://github.com/fanshicheng" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
        <i class="fab fa-github"></i>
    </a>



    <a href="mailto:2639144944@qq.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
        <i class="fas fa-envelope-open"></i>
    </a>







    <a href="tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=2639144944" class="tooltipped" target="_blank" data-tooltip="QQ联系我: 2639144944" data-position="top" data-delay="50">
        <i class="fab fa-qq"></i>
    </a>







</div>
    </div>
</footer>

<div class="progress-bar"></div>


    <!-- 搜索遮罩框 -->
<div id="searchModal" class="modal">
    <div class="modal-content">
        <div class="search-header">
            <span class="title"><i class="fas fa-search"></i>&nbsp;&nbsp;Search</span>
            <input type="search" id="searchInput" name="s" placeholder="Please enter a search keyword"
                   class="search-input">
        </div>
        <div id="searchResult"></div>
    </div>
</div>

<script type="text/javascript">
$(function () {
    var searchFunc = function (path, search_id, content_id) {
        'use strict';
        $.ajax({
            url: path,
            dataType: "xml",
            success: function (xmlResponse) {
                // get the contents from search data
                var datas = $("entry", xmlResponse).map(function () {
                    return {
                        title: $("title", this).text(),
                        content: $("content", this).text(),
                        url: $("url", this).text()
                    };
                }).get();
                var $input = document.getElementById(search_id);
                var $resultContent = document.getElementById(content_id);
                $input.addEventListener('input', function () {
                    var str = '<ul class=\"search-result-list\">';
                    var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
                    $resultContent.innerHTML = "";
                    if (this.value.trim().length <= 0) {
                        return;
                    }
                    // perform local searching
                    datas.forEach(function (data) {
                        var isMatch = true;
                        var data_title = data.title.trim().toLowerCase();
                        var data_content = data.content.trim().replace(/<[^>]+>/g, "").toLowerCase();
                        var data_url = data.url;
                        data_url = data_url.indexOf('/') === 0 ? data.url : '/' + data_url;
                        var index_title = -1;
                        var index_content = -1;
                        var first_occur = -1;
                        // only match artiles with not empty titles and contents
                        if (data_title !== '' && data_content !== '') {
                            keywords.forEach(function (keyword, i) {
                                index_title = data_title.indexOf(keyword);
                                index_content = data_content.indexOf(keyword);
                                if (index_title < 0 && index_content < 0) {
                                    isMatch = false;
                                } else {
                                    if (index_content < 0) {
                                        index_content = 0;
                                    }
                                    if (i === 0) {
                                        first_occur = index_content;
                                    }
                                }
                            });
                        }
                        // show search results
                        if (isMatch) {
                            str += "<li><a href='" + data_url + "' class='search-result-title'>" + data_title + "</a>";
                            var content = data.content.trim().replace(/<[^>]+>/g, "");
                            if (first_occur >= 0) {
                                // cut out 100 characters
                                var start = first_occur - 20;
                                var end = first_occur + 80;
                                if (start < 0) {
                                    start = 0;
                                }
                                if (start === 0) {
                                    end = 100;
                                }
                                if (end > content.length) {
                                    end = content.length;
                                }
                                var match_content = content.substr(start, end);
                                // highlight all keywords
                                keywords.forEach(function (keyword) {
                                    var regS = new RegExp(keyword, "gi");
                                    match_content = match_content.replace(regS, "<em class=\"search-keyword\">" + keyword + "</em>");
                                });

                                str += "<p class=\"search-result\">" + match_content + "...</p>"
                            }
                            str += "</li>";
                        }
                    });
                    str += "</ul>";
                    $resultContent.innerHTML = str;
                });
            }
        });
    };

    searchFunc('/search.xml', 'searchInput', 'searchResult');
});
</script>

    <!-- 回到顶部按钮 -->
<div id="backTop" class="top-scroll">
    <a class="btn-floating btn-large waves-effect waves-light" href="#!">
        <i class="fas fa-arrow-up"></i>
    </a>
</div>

    <script type="text/javascript">
        var OriginTitile=document.title,st;
        document.addEventListener("visibilitychange",function(){
            document.hidden?(document.title="(Ő∀Ő3)ノ",clearTimeout(st)):(document.title="ヽ(●-`Д´-)ノ欢迎回来",st=setTimeout(function(){document.title=OriginTitile},3e3))
        })
    </script>
    <!-- <script src="/js/cursor.js"></script> -->
    <script type="text/javascript">
        //只在桌面版网页启用特效
        var windowWidth = $(window).width();
        if (windowWidth > 768) {
            document.write('<script type="text/javascript" src="/js/sakura.js"><\/script>');
        }
        </script>
    <script src="/libs/materialize/materialize.min.js"></script>
    <script src="/libs/masonry/masonry.pkgd.min.js"></script>
    <script src="/libs/aos/aos.js"></script>
    <script src="/libs/scrollprogress/scrollProgress.min.js"></script>
    <script src="/libs/lightGallery/js/lightgallery-all.min.js"></script>
    <script src="/js/matery.js"></script>

    <!-- Baidu Analytics -->

    <!-- Baidu Push -->

<script>
    (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        } else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

    
    
    <script async src="/libs/others/busuanzi.pure.mini.js"></script>
    

    

    
    <script>
        (function (i, s, o, g, r, a, m) {
            i["DaoVoiceObject"] = r;
            i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date();
            a = s.createElement(o), m = s.getElementsByTagName(o)[0];
            a.async = 1;
            a.src = g;
            a.charset = "utf-8";
            m.parentNode.insertBefore(a, m)
        })(window, document, "script", ('https:' == document.location.protocol ? 'https:' : 'http:') +
            "//widget.daovoice.io/widget/6984b559.js", "daovoice")
        daovoice('init', {
            app_id: "377cb7de"
        });
        daovoice('update');
    </script>
    

	
    
    <script type="text/javascript" color="0,0,255"
        pointColor="0,0,255" opacity='0.7'
        zIndex="-1" count="99"
        src="/libs/background/canvas-nest.js"></script>
    

    

    

    
    <script src="/libs/instantpage/instantpage.js" type="module"></script>
    
    <!-- 冒泡 -->
    
<canvas class="fireworks" style="position: fixed;left: 0;top: 0;z-index: 1; pointer-events: none;" ></canvas> 
<script type="text/javascript" src="//cdn.bootcss.com/animejs/2.2.0/anime.min.js"></script> 
<script type="text/javascript" src="/js/fireworks.js"></script>


</body>

</html>
